It is prepared in the laboratory by the action of Conc. H2SO4 on chlorides.
H2SO4(aq)) + NaCL(aq) → Na2SO4(aq)) + HCL(g)
Then the hydrogen chloride gas can be dissolved in water to form hydrogen chloride acid.
NB: Due to the high solubility of hydrogen chloride, it is used in fountain experiments.
Ammonia and sulphur (iv) oxide can as well be used in the fountain experiment.