During the electrolysis of aqueous sodium chloride using inert electrodes (such as platinum or carbon), the cations (H+) are attracted to the cathode and are reduced to form hydrogen gas (H2). The anions (OH−) are attracted to the anode and are oxidized to form oxygen gas (O2).