The nitrogen-vacancy (NV) centre in diamond can be used as a solid-state quantum sensor with applications in magnetometry, electrometry, thermometry and chemical sensing. However, to deliver practical applications, existing NV-based sensing techniques, which are based on bulky and discrete instruments for spin control and detection, must be replaced by more compact designs. Here we show that NV-based quantum sensing can be integrated with complementary metal-oxide-semiconductor (CMOS) technology to create a compact and scalable platform. Using standard CMOS technology, we integrate the essential components for NV control and measurement-microwave generator, optical filter and photodetector-in a 200 mu m x 200 mu m footprint. With this platform we demonstrate quantum magnetometry with a sensitivity of 32.1 mu THz(-1/2) and simultaneous thermometry.