In this contribution, a simple representation for magnetic fields based on spherical harmonics is presented. Compared to the acquisition on a Cartesian grid, it reduces the amount of acquired and stored data, and may increase the precision of the field representation in given scenario. The series expansion of the field generated by a drive coil is presented and the truncation error is studied. Furthermore, time and space models of the magnetic fields generated by a field-free point and a field-free line scanner using the spherical harmonic representation are presented. The proposed representation has the potential to improve the analysis of the MPI technology, by providing a compact and flexible way to represent MPI scanners and the associated magnetic fields.