The quake also jolted the capital, Jakarta, shaking buildings and sending residents running out of their homes and high-rise office owers screaming in panic. A tsunami alert was issued but cancelled less than an hour later.
Officials said at least one person was killed and 27 injured in Jakarta, where the tremor caused cracks in some buildings and shattered windows.
The quake struck at 2.55 p.m. (0755 GMT) Wednesday with its epicentre 100 km south-west of Bandung, the capital of West Java. It was felt in areas as far away as the resort island of Bali.
The US Geological Survey put the quake's magnitude at 7.
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 magnitude 7.7 earthquake struck the southern coast of west Java in July 2006, killing more than 600 people and leaving tens of thousands homeless.
A major earthquake and subsequent tsunami also struck in December 2004, leaving more than 170,000 people dead or missing in Indonesia's Aceh province and half a million people homeless. A total of 230,000 people were killed in countries across the Indian Ocean in that tsunami and quake.