The quake hit the southwestern part of Hokkaido at a depth of about 30 kilometers (19 miles) and measured magnitude 5.8, according to the Japan Meteorological Agency. No tsunami was expected, it said.
Government spokesman Yoshihide Suga said at a news conference that no reports of major damage had been confirmed but an emergency task force had been set up at the Prime Minister's Office.
He said no irregularities were observed at the area's nuclear plants.
Public broadcaster NHK warned about possible landslides. The same area was hit by a magnitude 6.7 earthquake in September which triggered dozens of landslides and left more than 40 people dead. Dozens more people were injured.
Trains were temporarily halted in the city of Sapporo, and NHK showed crowds of stranded commuters. It is common for airports and railways to stop operations until runways and tracks can be checked.
Japan is one of the most earthquake- and tsunami-prone areas in the world. On March 11, 2011, a magnitude 9.0 offshore quake hit the northeast coast, causing a tsunami that took more than 18,000 lives and triggered a nuclear disaster at the Fukushima power plant.
Yuri Kageyama is on Twitter at https://twitter.com/yurikageyama
On Instagram at https://www.instagram.com/yurikageyama/?hl=en