We present XMM-Newton MOS imaging and PN timing data of the millisecond pulsar PSR J0218+4232. We confirm the previously detected pulsations of PSR J0218+4232 and we show that the folded lightcurve is dependent on energy. We present the broad band (0.2-10.0 keV) spectrum of this millisecond pulsar, as well as the spectra of: the pulsed emission, the individual pulses, the interpulse and the non-pulsed region and we compare our results with previous data from Rosat, BeppoSAX and Chandra. We discuss the results of the spectral fitting in the context of recent pulsar models.