Retrieval of atmospheric temperature or constituent profiles from vertical sounding spectroscopic measurements is an ill-posed problem, and additional information has to be introduced in the inversion process in order to compute meaningful solutions. Modern mathematical techniques are shown to be suitable for an analysis of these problems and the actual inversion to retrieve atmospheric profiles. A stable and efficient numerical implementation of Phillips-Tikhonov regularization techniques is discussed; generalized singular value decomposition is the appropriate tool to compute the formal solution of the modified minimization problem, and the L-curve permits determination of the optimum balance between information from measurement and side constraints. It is also shown that these techniques can provide further insight in the basic ill-posed nature of the inverse problem, give tools for the diagnostics of the retrieved profiles, and allow a discussion of the relation to other standard retrieval techniques, especially optimal estimation. The methods are demonstrated on examples for retrieval of ozone and hydroxyl profiles from simulated far infrared high-resolution spectra. A comparison with optimal estimation retrieval is performed by a preliminary analysis of a Spitsbergen millimeter-wave spectrum of ozone.