A moderate earthquake with a magnitude of 4.5 has rattled Tokyo, causing buildings to shake in the heart of the metropolis, officials say.

The epicentre of the earthquake was 50km underground in Ibaraki prefecture northeast of the capital, the Japan Meteorological Agency said.

Ibaraki police said they had no immediate reports of damage from the earthquake, which struck at 3.13pm (1613 AEST). No tsunami warning was issued.

Japan is hit by 20 per cent of the world's powerful earthquakes.