Purpose: Quantitative Susceptibility Mapping (QSM) is a post-processing technique applied to gradient-echo phase data. QSM algorithms require a signal mask to delineate regions with reliable phase signal for subsequent susceptibility estimation. Existing masking techniques used in QSM have limitations that introduce artefacts, exclude anatomical detail, and rely on parameter tuning and anatomical priors that narrow their application. Here, a robust masking and reconstruction procedure is presented to overcome these limitations and enable automated QSM processing for a wide range of use-cases implemented in an open-source software framework: QSMxT. Methods: A robust masking technique that automatically separates reliable from less reliable phase regions was developed and combined with a two-pass reconstruction procedure that operates on the separated sources before combination, extracting more information while reducing the influence of artefacts. Results: Compared with standard masking and reconstruction procedures, the two-pass inversion reduces streaking artefacts caused by unreliable phase and high dynamic ranges of susceptibility sources. QSMxT is robust across a range of datasets at 3 T in healthy volunteers and phantoms, at 7 T in tumour patients, and in the QSM challenge 2.0 simulated brain dataset, with significant artefact and error reductions, greater anatomical detail, and minimal parameter tuning. Conclusion: QSMxT generates masks for QSM that separate reliable from less reliable phase regions, enables a more accurate QSM reconstruction that mitigates artefacts, operates without anatomical priors, and requires minimal parameter tuning. QSMxT makes QSM processing more accessible, reliable and reproducible.