We present the first systematic study of potential energy curves and prolate-oblate shape transitions of sodium clusters with 8 < N < 40 atoms. The Kohn-Sham equations are solved in the local density approximation for the jellium model with spheroidal deformations. The ionic background density is taken to have a diffuse surface of Woods-Saxon type. The quadrupole and hexadecupole moments of the electron and jellium densities are investigated, revealing a strong hexadecupole dependence for selected clusters. Collective dipole resonances are described in the simple surface plasmon model. Shape transitions are found to occur at particle numbers 12–14 (prolate-oblate), 18–20–22 (oblate-spherical-prolate) and 30–32 (prolate-oblate), which are in good agreement with experimental results; triaxiality is predicted for Na-36. Comparing our results with those of molecular dynamics calculations, we confirm the scheme of Kohn-Sham levels and the gross behaviour of potentials and densities.