Abstract1D periodic array of trenches and a 2D array of ordered macropores, with trenches, have been fabricated by photoelectrochemical etching (PECE) of n‐Si (100). The roughness of the vertical walls of the deep trenches has been studied in relation to geometric parameters of the structures, etching regime and subsequent treatment in a KOH solution or thermal oxidation. It is shown that the smoothest walls are obtained in structures where the distance between the constituent elements is equal to the characteristic period a dependent on the resistivity of Si. The optimal etching current density for structures of both types is j /jPS = 0.4, where jPS is the critical current density corresponding to the transition from pore formation to electrochemical polishing. An additional smoothing diminished the height of wall irregularities up to ∼25 nm. (© 2011 WILEY‐VCH Verlag GmbH & Co. KGaA, Weinheim)