Monitoring the integrity of structures in the oil and gas industry is a mandatory task that helps preventing both natural disasters and economical losses. This paper presents the optimization of the geometry of a magnetic circuit for the detection of faults in a pipeline by the magnetic flux leakage method. The main goal of these efforts is to perform a sensitivity analysis on the geometrical parameters of the circuit to find configurations that improve the performance of the fault searching tool. The sensitivity analysis of the design parameters of the magnetic circuit is based on numerical evaluations of the performance of the tool using the finite element method. The commercial software selected for this analysis is COMSOL Multiphysics®. The results obtained in this investigation will identify the geometrical configurations that provide better performance, with respect to other configurations, for the detection of the same fault. The findings of this investigation can be utilized as guidelines for the design of magnetic circuits for non-destructive testing using the magnetic flux leakage technique.