There were no reports of casualties, with only light damage to structures near the epicenter, according to local officials.
The quake hit at 5:08 p.m. and was felt most strongly in central Fukushima prefecture about 130 miles (210 kilometers) northeast of Tokyo, according to the Japan Meteorological Agency.
"It was fairly strong, but didn't knock over anything in the office," said Ken Yoshida, a town official in Naraha, one of the hardest-hit areas. He said an earthen wall in town was partially toppled.
The earthquake was centered about 50 miles (80 kilometers) off the eastern coast at a depth of about 25 miles (40 kilometers), the meteorological agency said.
The government said there was no danger of a tsunami, although slight changes to ocean levels were a possibility in some areas.
It was strong enough to gently sway large buildings in Tokyo and was felt across a broad stretch of Japan's main Honshu and northern Hokkaido islands.
Japan's early warning system predicted the earthquake just before it hit, with public broadcaster NHK interrupting a sumo match to warn residents to take cover.
The country is one of the world's most earthquake-prone countries. In 1995, a magnitude-7.2 quake in the western port city of Kobe killed 6,400 people.