The discovery of ferromagnetism in 2D van der Waals (vdW) crystals has generated widespread interest. Making further progress requires quantitative knowledge of the magnetic properties of vdW magnets on the nanoscale. We use scanning single-spin magnetometry based on diamond NV centers to image the magnetization, localized defects and magnetic domains of atomically thin crystals of the vdW magnet CrI 3. We determine the magnetization of CrI 3 monolayers to be ≈16μ B/nm 2 with comparable values in samples with odd numbers of layers, whereas the magnetization vanishes when the number of layers is even. We also find that structural modifications can induce switching between ferro- and anti-ferromagnetic interlayer ordering. These results demonstrate the power of single-spin scanning magnetometry to study the magnetism of 2D vdW magnets.