In this paper, we present the details of the development of a smartphone spectrometer for education using a 3D printer and characterized the performance by comparison with a paper craft spectrometer. The optical design and the narrow slit used in the build resulted in the formation of accurate images of the slit on the image sensor leading to a superior resolution compared to the paper craft spectrometer. The measured spectral resolution of the 3D-printed smartphone spectrometer was 0.4 nm, which was narrower than those of other smartphone spectrometers. Increasing the exposure time of the phone's camera revealed the fine structure of a spectrum with high resolution. The baffle structure inside the spectrometer proved to be effective in removing noise when the exposure time was increased. We expect the 3D-printed smartphone spectrometer proposed in this paper can be useful as an education tool for students to understand the various aspects of light, atoms, chemistry, and physics.