This report demonstrates a new way to precipitate inorganic phases through pH jumps driven by optical excitation of a photobase. The level of the pH jumps is manipulated by either the wavelength range or illumination time used. The method is demonstrated by precipitation of CaCO3 and ZnO. Vaterite spheroids and shells for CaCO3 as well as flakes and hexagonal plates for ZnO are formed under various controllable conditions. Notably, ZnO films could be formed and patterned directly on quartz substrates using a photomask. The film thickness was easily controlled by illumination time. This method is an important step toward self-organized crystallization with spatiotemporal control fully in the hands of the experimenter.