In this study, a two-step photolithographic process for selective formation of porous silicon is described. The process utilizes coatings of silicon nitride or silicon carbide on silicon. These films are impervious to the HF solution during anodic etching in an ambient environment. However, when the coated wafer is illuminated during anodization, microcracks are produced in the illuminated regions. Creation of these microcracks results in formation of porous silicon in the underlying regions. The patterning of 100 mu m features is deemed possible with this technology.