This paper describes the Fourth Data Release of the Sloan Digital Sky Survey (SDSS), including all survey-quality data taken through 2004 June. The data release includes five-band photometric data for 180 million objects selected over 6670 deg(2) and 673,280 spectra of galaxies, quasars, and stars s...