An iterative nonlinear least-squares fitting algorithm in the frequency domain using time domain models for quantification of complex frequency domain MR spectra is presented. The algorithm allows incorporation of prior knowledge and has both the advantage of time-domain fitting with respect to handling the problem of missing data points and truncated data sets and of frequency-domain fitting with respect to multiple frequency-selective fitting. The described algorithm can handle, in addition to Lorentzian and Gaussian lineshapes, Voigt and nonanalytic lineshapes. The program allows the user the design of his own fitting strategy to optimize the probability of reaching the global least-squares minimum. The application of the fitting program is illustrated with examples from in vivo 1H-, 31P-, and 13C-MR spectroscopy.