Removal of chlorine from a substance by chemically replacing it with hydrogen or hydroxide ions in order to detoxify the substances involved.