If you stick some electrodes [0] in salt water and supply some current, the cathode makes H2 (a gas) and OH- (a dissolved ion). The anode makes Cl2 (a gas) and removes Cl- (a dissolved ion). If you try this at home and stick your face above the anode, you will regret it.
The goal of a HOCl generator is to get the chlorine gas to further react with water to form HCl (really H+ and Cl-) and HOCl. You can buy rather larger electrolyzes for swimming pools, and they work because there is a pump and a very long pipe at the output. The chlorine get broken up into tiny bubbles and has a long time to react. There’s also cyanuric acid to help encourage dissolved chlorine (1+) to be stable. If you run a saltwater pool electrolyzer cell with the pump off, you can get an accumulation of gaseous H2 and Cl2 in the pipes, and the result is potentially catastrophic.
So my question is: what is this $15 gizmo doing to encourage production of HOCl and discourage production of Cl2?
[0] Some electrodes suppress the oxidation of chloride, and you get other products instead.
edit: I saw your edit. The sodium stays put. You start with Na+ and you end up with Na+. The net reaction produces (hopefully) NaOH, HCl, and H2.
> The use of chlorine products that form hypochlorous acid in solution at very low pH has limited potential for long-term applications. At this pH <4.0, dissolved chlorine gas can be rapidly lost due to volatilization, decreasing the biocidal effectiveness of the solution over time, but creating human health and safety issues.
It is not advisable to do this indoors IMO. Generally you are producing a pretty small amount, say 12 oz at 180 ppm.
There are commercial products (eg Force of Nature) that provide NaCl + acetic acid capsules in the right proportion to generate HOCl at home in a printer-ink type of business model.
I'm not sure about the salt; I have tasted some of the HOCl and it does taste somewhat salty (this is also true of commercial preparations sold for dermal use) . I have not tried to make bleach -- this could be a stumbling block for drinking water! I wanted to show the OP's idea of portable + inexpensive electrolysis for making bleach is possible, but admittedly I'm not sure how well this would work for sanitizing drinking water.