Free electrons deplete photons from Type Ia supernovae through the (inverse) Compton scattering. This Compton dimming increases with redshift and reaches 0.004 mag at z = 1 and 0.01 mag at z = 2. Although far from sufficient to invalidate the existence of dark energy, it can bias constraints on dark energy at a level nonnegligible for future supernova surveys. This effect is correctable and should be incorporated in supernova analysis. The Compton dimming has similar impact on cosmology based on gamma-ray bursts as standard candles.