Electrolysis of water is the decomposition of water into oxygen and hydrogen due to passage of electric current. In electrolysis water splits into its atomic components hydrogen and oxygen using electricity.
Cathode:2H2O+2e−→H2+2OH−Anode:4OH−→O2+2H2O+4e−Overall:2H2O→2H2+O2