In the past 15 years, the advent of aberration correction technology in electron microscopy has enabled materials analysis on the atomic scale. This is made possible by precise arrangements of multipole electrodes and magnetic solenoids to compensate the aberrations inherent to any focusing element of an electron microscope. Here, we describe an alternative method to correct for the spherical aberration of the objective lens in scanning transmission electron microscopy (STEM) using a passive, nanofabricated diffractive optical element. This holographic device is installed in the probe forming aperture of a conventional electron microscope and can be designed to remove arbitrarily complex aberrations from the electron's wave front. In this work, we show a proof-of-principle experiment that demonstrates successful correction of the spherical aberration in STEM by means of such a grating corrector (GCOR). Our GCOR enables us to record aberration-corrected high-resolution high-angle annular dark field (HAADF-) STEM images, although yet without advancement in probe current and resolution. Improvements in this technology could provide an economical solution for aberration-corrected high-resolution STEM in certain use scenarios.