It can also be made by reacting potassium chloride with ammonium nitrate . An alternative way of producing potassium nitrate without a by-product of ammonia is to combine ammonium nitrate and potassium chloride , easily obtained as a sodium-free salt substitute .