SUMMARYThe combination of substrate unevenness and capillarity is known to induce far-reaching perturbations at the free surface of thin liquid films. These might be undesired and this paper explores the possibility to control the free surface of thin liquid films to give it a prescribed profile by a suitable design of the underlying substrate. This corresponds to the inverse of the widely studied forward problem, which considers the effect of substrate unevenness on a free surface. Assuming that the steady free surface profile can be described by the lubrication approximation, this optimal control problem is shown to be governed by a first-order partial differential equation, which is solved numerically using the method of characteristics. The proposed method is successfully tested for a range of desired free surface profiles and the domain of existence of a solution to the inverse problem is probed. Expectedly, it is shown that, owing to surface tension, not all free surface profiles can be achieved but in some cases capillarity can be beaten and a prescribed free surface profile obtained.