A general strategy for the in-plane structuring of organic-inorganic perovskite films is presented. The method is used to fabricate an industrially relevant distributed feedback (DFB) cavity, which is a critical step toward all-electrially pumped injection laser diodes. This approach opens the prospects of perovskite materials for much improved optical control in LEDs, solar cells, and also toward applications as optical devices.