it is made by electrolysis (the passing of electricity through a solution to make chemical reactions happen) of sodium chloride. this is known as the chloralkali process. it can also be made by reacting hydrogen chloride with oxygen and a catalyst. it can be made in the laboratory by reacting manganese dioxide with hydrochloric acid. it is made when sodium hypochlorite reacts with hydrochloric acid. this is a dangerous reaction that can happen without anyone knowing.