The third post-Newtonian gravitational wave polarizations and associated spherical harmonic modes for inspiralling compact binaries in quasi-circular orbits