A simplified model is used to identify the diffuser shape that maximises pressure recovery for several classes of non-uniform inflow. We find that optimal diffuser shapes strike a balance between not widening too soon, as this accentuates the non-uniform flow, and not staying narrow for too long, which is detrimental for wall drag. Three classes of non-uniform inflow are considered, with the axial velocity varying across the width of the diffuser entrance. The first case has inner and outer streams of different speeds, with a velocity jump between them that evolves into a shear layer downstream. The second case is a limiting case when these streams are of similar speed. The third case is a pure shear profile with linear velocity variation between the centre and outer edge of the diffuser. We describe the evolution of the time-averaged flow profile using a reduced mathematical model that has been previously tested against experiments and computational fluid dynamics models. The model consists of integrated mass and momentum equations, where wall drag is treated with a friction factor parameterisation. The governing equations of this model form the dynamics of an optimal control problem where the control is the diffuser channel shape. A numerical optimisation approach is used to solve the optimal control problem and Pontryagin’s maximum principle is used to find analytical solutions in the second and third cases. We show that some of the optimal diffuser shapes can be well approximated by piecewise linear sections. This suggests a low-dimensional parameterisation of the shapes, providing a structure in which more detailed and computationally expensive turbulence models can be used to find optimal shapes for more realistic flow behaviour.