We present a numerical method for the inverse shape design of internal flows based on the inverse Euler equations (Keller JJ, Physics of Fluids 1999; 11 and Zeitschrift für Angewandte Mathematik und Physik 1998; 49). We describe an efficient numerical method based on a finite difference discretization and on a Newton–Krylov solver. After showing that the three-dimensional (3D) inverse Euler equations hold only for complex lamellar flows, we extend the basic axis-symmetric flow model to handle viscous effects by means of a distributed loss model and to handle quasi-3D effects by deriving a quasi-3D formulation of the inverse Euler equations from the passage averaged 3D Euler equations. The coupling of the 2D inverse Euler equations with an integral boundary layer method is presented too. Copyright © 2003 John Wiley & Sons, Ltd.