A spectral approach is proposed to determine the flow field of a thin film inside narrow channels of arbitrary shape. Although the method is easily extended to transient flow, only steady flow is considered here. The flow field is represented spectrally in the depthwise direction in terms of orthonormal shape functions, which together with the Galerkin projection lead to a system of ordinary differential equations that can be solved using standard methods. The method is particularly effective for nonlinear flow, including nonlinearities of geometrical or material origins. The validity of the proposed method is demonstrated for a flow with inertia, and, unlike the depth-averaging method, is not limited to a flow at small Reynolds number. The problem is closely related to high-speed lubrication flow. The validity of the spectral representation is assessed by examining the convergence of the method, and comparing it with the fully two-dimensional finite-element solution, and the widely used depth-averaging method from shallow-water theory. It is found that a low number of modes are usually sufficient to secure convergence and accuracy. The influence of inertia is examined on the velocity and pressure fields. The pressure distributions reflect excellent agreement between the low-order spectral method and the finite-element solution, even at moderately high Reynolds number. The depth-averaging solution is unable to predict accurately (qualitatively and quantitatively) the high-inertia flow. Comparison of the velocity field reflects the expected discrepancy in a boundary layer formulation. Copyright © 2012 John Wiley & Sons, Ltd.