We have observed the middle-aged pulsar PSR B0656+14 with the prism and the NUV MAMA detector of the Space Telescope Imaging Spectrograph ( STIS ) to measure the pulsar spectrum and periodic pulsations in the near-ultraviolet ( NUV ) . The pulsations are clearly detected , double-peaked and very similar to the optical pulse profile . The NUV pulsed fraction is 70 \pm 12 % . The spectral slope of the dereddened phase-integrated spectrum in the \sim 1800 - 3200 Å range is \sim \alpha _ { \nu } = 0.35 \pm 0.5 which together with the high pulse fraction indicates a non-thermal origin for the NUV emission . The total flux in the range \sim 1700 - 3400 Å is estimated to be 3.4 \pm 0.3 \times 10 ^ { -15 } erg s ^ { -1 } cm ^ { -2 } when corrected for E ( B - V ) = 0.03 mag . At a distance of 288 pc this corresponds to a luminosity L _ { NUV } = 3.4 \times 10 ^ { 28 } erg s ^ { -1 } assuming isotropy of the emission . We compare the NUV pulse profile with observations from radio to gamma-rays . The first NUV sub-pulse is in phase with the gamma-ray pulse marginally detected with EGRET , while the second NUV sub-pulse is similar both in shape and in phase with the non-thermal pulse in hard X-rays . This indicates a single origin of the non-thermal emission in the optical-NUV and in the X-rays . This is also supported by the observed NUV spectral slope , which is compatible with a blackbody plus power-law fit extended from the X-ray range , but dominated by the power-law component in most of the NUV range .