Question about Z axis data from HMC5883L Compass


I am testing HMC5883L 3axis compass sensor.
Z axis raw data from the sensor is always 0 or -1.(X and Y data is OK!!).
Is it normal?

No, that is not normal.
The eartch magnetic vector could point with an angle down into the earth, it depends where you are located. Sometimes the Z-axis is even larger than the X and Y.
Click on your location and look at the x,y,z values : World Magnetic Model Calculator
Where I live, the inclination is 67 degrees down into the earth, that means the Z is larger than the X and Y.

Could you show your code ? between code tags.
Or if you have installed a library for it, tell us which library and how you have installed it.
Can you give a link to the HMC5883L module that you bought.
How did you connect the sensor ? The HMC5883L is 3.3V sensor, and most basic Arduino boards are 5V boards. I hope you have not connected the sensor to 5V.