Introduction: Vitamin D deficiency is likely a substantial contributor to the progression of the hepatitis B virus (HBV) to chronic hepatitis B (CHB), cirrhosis (LC) and hepatocellular carcinoma (HCC). This study aims to compare serum vitamin D levels between patients with HBV and healthy controls. Method: In this cross-sectional study in southern Iran, 114 HBV patients including 59 active chronic hepatitis, 42 inactive carriers, 15 patients with liver cirrhosis and 104 healthy controls were enrolled. Demographic data and respective biochemical assays were carried out. T-test, Mann-Whitney, and regression using SPSS16 software were performed to determine the effect of vitamin D on other variables. Results: Serum vitamin D levels lower than 30 ng / ml was observed in 94 cases (81.03%) in HBV group and in 70 cases (67.30%) in controls. The prevalence of severe deficiency (<10 ng / ml) and between 10-20 ng / ml in HBV patients was 51.7%. The frequency in the subgroups of HBV was as follows: CHB (% 43.10), L.C (% 80), Inactive carriers (% 52.41), while in control group (H.C) was (44.20%) (P <0.001). Distribution of vitamin D deficiency in rural people was more than urban population (OR = 2.321), which is statistically significant in two groups (P=0.004). Logistic regression analysis for ALT (P = 0.38), AST (P = 0.005), AFP (P = 0.005), and ALB (P = 0.085) showed a meaningful associations. Conclusion: Our study showed that vitamin D levels was significantly lower in all groups of patients with HBV compared with healthy controls. Of note, in healthy controls, insufficient levels of vitamin D compared to the standard range was observed. Therefore, conducting large population-based screening and underlying studies to identify the respective causes.