We cannot convert hydrochloric acid into carbon dixoide but we can use hydrochloric acid to produce carbon dixoide using a metal carbonate.
The reaction of a metal carbonate with hydrochloric acid yields metal chloride with water and carbon dioxide.
HCl + calcium carbonate → calcium chloride + carbon dioxide + water.
2HCl(aq)+CaCO3(s)→CaCl2(aq)+CO2(g)+H2O(l)