Relativistic theory for calculating nuclear magnetic shielding constants is presented and applied to the proton shielding constant of hydrogen halides HX (X = F, Cl, Br, I). The spin-free relativistic (SFR) Hamiltonian is due to the no-pair theory of Sucher and Hess and is dealt with, together with the spin-orbit (SO) operator, by modifying the SO-UHF (unrestricted Hartree-Fock) method proposed previously. The SFR part introduces no new term to the shielding constant than those presented in the SO-UHF method. For the 1H chemical shift, the SO effect of the heavy halogen is important, as reported previously, but the effect of the SFR term is small since it is essentially local on the heavy halogen atom.