Perchlorate (ClO4−) and possibly chlorate (ClO3−) are considered to be ubiquitous on Mars1–5, and the ClO3−/ClO4− abundance ratio has critical implications for the redox conditions6,7, aqueous environments8,9 and habitability on Mars10. However, factors that control the ClO3−/ClO4− generation ratios are not well established. Here we expose mixtures of halite salt (NaCl) with Fe sulfates, Fe (hydr)oxides and Fe3+ montmorillonite to ultraviolet radiation or ozone in an Earth or CO2 atmosphere and show that Fe secondary mineralogy is the dominant factor controlling the ClO3−/ClO4− generation ratio: the sulfates and montmorillonite mixtures produce much higher yields of ClO4− than of ClO3−, whereas the opposite is true for the (hydr)oxide mixtures. Consistent with previous studies11–18, our results indicate that the physical state of chloride (Cl−) (that is, solid, liquid or gas) and the characteristics of the co-occurring minerals (for example, semiconductivity, surface area, acidity) have the greatest influence, whereas oxidation sources (ultraviolet radiation or ozone) and atmospheric composition induce only secondary effects. We conclude that, under the hyperarid climate and widespread Fe (hydr)oxide abundances prevailing on Mars since the Amazonian period19, Cl− oxidation should produce yields of ClO3− that are orders of magnitude higher than those of ClO4−, highlighting the importance of ClO3− in the surficial environments and habitability of modern Mars compared with ClO4−.