This paper deals with the modeling and optimization of a photochemical reactor for the production of hydroxyl radicals. These radicals can be used in advanced oxidation processes for water purification. The UV-lamps used in the photochemical reactor lead to a relatively high energy and operating cost. Minimization of these costs is possible via a model-based optimization of the reactor geometry. First, a model is built taking into account the reaction kinetics, the reactor geometry and the radiation intensity distribution in the reactor. Afterwards, two different configurations of photochemical reactors are optimized. The first modeled reactor configuration is a single-lamp reactor and consists of a cylindrical UV-lamp that is present inside a quartz sleeve, outside of which the water flows between it and the external reactor wall (annular channel reactor). A rigorous optimization problem is formulated consisting of the calculation of the optimal reactor geometry (length and radius) in such a way that, for a given reactor volume and a given flow rate of the water to be treated, the mean outlet concentration of an organic pollutant is minimized. By solving this optimization problem, it has been shown that an optimal reactor length exists. If the absorption coefficient of the water or the reaction rate constant increases, the optimal reactor length increases as well. The second modeled reactor configuration is similar to the first one but now contains multiple lamps positioned symmetrically in a circular pattern (i.e. multi-lamp reactor). The optimization problem consists of the calculation of the optimal lamp position inside the reactor in such a way that the mean outlet concentration of an organic pollutant is minimized. The lamp position is given by the radial distance between the centers of the reactor and a lamp. Again a well-posed optimization problem is obtained and an optimal lamp position exists. If the number of lamps or the reaction rate constant increases or the absorption coefficient of the water decreases, the optimal distance between the centers of the reactor and the lamp increases.