Officials said at least one person was killed and 27 injured in Jakarta, where the tremor cracked some buildings and shattered windows.
The quake struck at 2:55 p.m. Wednesday with its epicentre 142 km southwest of Bandung, the capital of West Java. It was felt in areas as far as the resort island of Bali.
The US Geological Survey put the quake's magnitude at 7.0.
Indonesia, the world's largest archipelago nation, sits on the so-called Pacific Ring of Fire, which is prone to earthquakes and volcanic activity because continental plates meet there.
A 7.7-magnitude earthquake struck the southern coast of west Java in July 2006, killing more than 600 people and leaving tens of thousands of others homeless.
A major earthquake and subsequent tsunami struck in December 2004, leaving more than 170,000 people dead or missing in Indonesia's Aceh province and half a million people homeless.