Photoenhanced electrochemical ͑PEC͒ etching in an unstirred KOH solution under He-Cd laser illumination was used for delineating extended defects in GaN films. When a low-excitation intensity was employed, the process yielded threading vertical features at dislocation sites. Application of an external voltage or a higher-illumination intensity led to high-etch rates with smooth surfaces. Some highly resistive samples, for which no etching was obtained under normal etching conditions, could be etched with the application of a single-polarity external voltage. Finally, in a GaN sample with an AlN/GaN superstructure inside, high selectivity between AlN and GaN was achieved; in this case, the PEC process stopped at the thin AlN stop layer.