The energy spectrum of an electron confined to an arbitrary surface of revolution in an external magnetic field, parallel to the symmetry axis, is studied analitycally and numerically. The problem is reduced via conformal mapping to one on the surface of a sphere. The case of a spheroid is considered in details, and the dependence on parameters is discussed. In the high magnetic field limit a regular structure in the energy spectrum, resembling the Landau levels, is obtained. Level statistics is discussed.