We present a method for solving the inverse magnetostatic problem using fictitious magnetic charges. The method utilizes the fact that a given magnetic stray field is generated by only one unique charge distribution. Furthermore the usage of fictitious magnetic charges reduces the number of degrees of freedom when solving the inverse problem. We demonstrate two numerical experiments showing that these advantages make the method more efficient and that it has better smoothing properties regarding noise in the input data compared to a previous method using the magnetization.