Reflectors are an essential component for on-chip integrated photonics. Here, we propose a new method for designing reflectors on the prevalent thin-film-on-insulator platform by using genetic-algorithm optimization. In simulation, the designed reflector with a footprint of only 2.16 μm×2.16 μm can achieve ∼97% reflectivity and 1 dB bandwidth as wide as 220 nm. The structure is composed of randomly distributed pixels and is highly robust against the inevitable corner rounding effect in device fabrication. In experiment, we fabricated on-chip Fabry–Perot (FP) cavities constructed from optimized reflectors. Those FP cavities have intrinsic quality factors of >2000 with the highest value beyond 4000 in a spectral width of 200 nm. The reflectivity fitted from the FP cavity resonances is >85% in the entire wavelength range of 1440–1640 nm and is beyond 95% at some wavelengths. The fabrication processes are CMOS compatible and require only one step of lithography and etch. The devices can be used as a standard module in integrated photonic circuitry for wide applications in on-chip semiconductor laser structures and optical signal processing.