Reflecting light from a mirror moving close to the speed of light has been envisioned as a route towards producing bright X-ray pulses since Einstein's seminal work on special relativity. For an ideal relativistic mirror, the peak power of the reflected radiation can substantially exceed that of the incident radiation due to the increase in photon energy and accompanying temporal compression. Here we demonstrate for the first time that dense relativistic electron mirrors can be created from the interaction of a high-intensity laser pulse with a freestanding, nanometre-scale thin foil. The mirror structures are shown to shift the frequency of a counter-propagating laser pulse coherently from the infrared to the extreme ultraviolet with an efficiency >10 4 times higher than in the case of incoherent scattering. Our results elucidate the reflection process of laser-generated electron mirrors and give clear guidance for future developments of a relativistic mirror structure.