Production of hexavalent chromium during electrolysis using a stainless steel as the cathode
In anode, things get oxidized. That is why the chromium in anode would become hexavalent chromium (hexavalent chromium is the oxidized form of chromium).

In cathode, things get reduced (opposite of oxidized). That is why you could remove rust, because rust is the oxidized form of iron, so if you reduce rust, you would get iron.

You will not obtain hexavalent chromium, because that is not possible through reduction of chromium; that is only possible through oxidation of chromium, which is impossible at a cathode.



You can reduce hexavalent chromium to trivalent chromium with sulphite in acidic environment:

$$\ce{Cr2O7^2- + 8H+ + 3SO3^2- -&gt; 2Cr^3+ + 3SO4^2- + 4H2O}$$

Then you can precipitate out the trivalent chromium with sodium hydroxide:

$$\ce{Cr^3+ + 3NaOH -&gt; Cr(OH)3(s) + 3Na+}$$