Inversion of magnetic data has long been hampered by the need to specify the direction of magnetization. We present a general approach that utilizes the minimal dependence on magnetization direction of amplitude and total gradient data and thereby overcome the difficulty associated with inversion when unknown remanent magnetization is present. To construct the inversion algorithm for the magnitude of magnetization, we solve a nonlinear minimization problem formulated using Tikhonov regularization. A positivity constraint is also incorporated to improve the solution. The algorithm will be illustrated with both synthetic and field data sets.