How are chlorine gas, and dihydrogen prepared from sodium chloride solutions?
The process starts with brine, which it elecytrolytically converts to caustic soda, and dihydrogen and chlorine gases. These are commodity chemicals for which there is huge industrial demand. The link will give you details.
As you will appreciate, this reaction requires substantial energy input.