Objective The aim of the present study was to evaluate the plasma vitamin D (vit D) levels and their association with the disease activity in patients with ankylosing spondylitis (AS) and undifferentiated spondyloarthritis (uSpA) compared with healthy populations. Methods This study included 161 spondyloarthritis patients (113 uSpA patients and 48 AS patients) attending our rheumatology out-patient clinic, along with 92 controls. Results The plasma vit D levels were 18 μg/L (8-38) in the AS group, 20 μg/L (4-92.3) in the uSpA group and 24.3 μg/L (7.2-76.8) in the control group. The plasma vit D levels of the AS patients were significantly lower than those of the patients in the control group (p=0.004). The men in the AS group had significanly lower vit D levels than those in the control group (p=0.005). On the other hand, the women in the uSpA group had significanly lower vit D levels than those in the control group (p=0.011). The vit D levels were inversely related to both erythrocyte sedimentation rate (ESR) and C-reactive protein (CRP) in the AS patients (p=0.002, R=-0.428; p<0.001, R=-0.592, respectively). This correlation was not demonstrated in the uSpA patients. The vit D levels were not found to correlate with the Bath Ankylosing Spondylitis Disease Activity Index (BASDAI) levels in either the AS or uSpA patients. Conclusion 25-hydroxy-vit D deficiency is frequently observed in patients with SpAs. In this study, vit D deficiency was much more prominent in the male AS patients. On the other hand, among women, the uSpA patients exhibited much more prominent vit D deficiency than the control group subjects. The acute phase response may inversely affect the vit D levels in AS patients.