From what I recall, there are 3 recipe chains that produce pure water as a byproduct.
The first is in the Hydrazine chain, however, this is far less than the requirement of pure water to begin with, and with the use of overflow/underflow valves (or if you don't have the logistics mod installed, pumps wired to the tank with some logic), you can prioritise the byproduct water feeding into the electrolysers first.
The second is on the RTG chain. I think this one is perfectly balanced so it produces exactly the amount you need, so you can feed the output back to the input, and it's self sufficient. You just need to add a little to kickstart the process.
The third one is from the Deuterium process, Water is split into mostly pure water, and a small amount of heavy water. This one is intentionally a pain in the arse because if it were easy to just get rid of the pure water, you'd basically just end up with a lot of high end fusion fuel for very little effort.