An effective extension to the particle swarm optimizer scheme has been developed to visualize and modelize robustly magnetic data acquired across vertical or dipping faults. This method can be applied to magnetic data sets that support various investigations, including mining, fault hazards assessment, and hydrocarbon exploration. The inversion algorithm is established depending on the second horizontal derivative technique and the particle swarm optimizer algorithm and was utilized for multi-source models. Herein, the inversion method is applied to three synthetic models (a dipping fault model contaminated without and with different Gaussian noises levels, a dipping fault model affected by regional anomaly, and a multi-source model) and three real datasets from India, Australia, and Egypt, respectively. The output models confirm the inversion approach’s accuracy, applicability, and efficacy. Also, the results obtained from the suggested approach have been correlated with those from other methods published in the literature.