Hydrochloric acid , like all acids , react with bases to produce salts ( chlorides ) .
Hydrochloric acid can therefore be used to prepare salts called chlorides , such as sodium chloride .