We describe a novel approach for the rational design and synthesis of self-assembled periodic nanostructures using martensitic phase transformations. We demonstrate this approach in a thin film of perovskite SrSnO3 with reconfigurable periodic nanostructures consisting of regularly spaced regions of sharply contrasted dielectric properties. The films can be designed to have different periodicities and relative phase fractions via chemical doping or strain engineering. The dielectric contrast within a single film can be tuned using temperature and laser wavelength, effectively creating a variable photonic crystal. Our results show the realistic possibility of designing large-area self-assembled periodic structures using martensitic phase transformations with the potential of implementing built-to-order nanostructures for tailored optoelectronic functionalities.