This technology relates to a process for creating electrodes in which high-surface area nanostructures are fabricated in situ by electrochemically etching a sacrificial scaffold material. Removing a material after it has been built into the cell opens up pores within the electrode whose size and density can be controlled, resulting in higher efficiency and Pt utilization. Etching a material, such as carbon, is as simple as briefly bringing the cell to a water electrolysis potential, and the oxide (C02) will not poison the membrane or catalyst as it leaves the cell, and no further processing steps are required to reactivate ion-exchange sites. In situ etching results in high-surface area nanostructures which cannot be practically fabricated outside the cell and transferred to the membrane without damaging the delicate structure. The etching process is fast and cheap to implement, and eliminates costly and time-consuming processing steps outside the cell.