I have a project on the Hilbert Curve fractal and I was working on finding the dimension it is in. I found online that it was 2, and found an equation: log(number of pieces a single piece forms during one iteration)/log(reciprocal of the reduction factor of one iteration), and think I plugged in the correct numbers: log(4)/log(2), to get 2, the same answer. However, because I wasn't sure if I used the equation correctly, I asked a friend and they said it is 2 dimensional because it's a space-filling curve for a 2D square. Is this a correct explanation, and is my equation also ultimately correct?

Thanks for your help!