The shallow quake, which hit southwest of the island of Sumatra on Wednesday, had a depth of 10 kilometers (six miles).
The epicenter was located 808 kilometers (502 miles) southwest of Padang.
There were no immediate reports of damage or casualties. However, shallower earthquakes are more likely to cause damage.
In 2004, a 9.1 magnitude earthquake struck 160 kilometers (99 miles) off the western coast of northern Sumatra, resulting in a tsunami.
Indonesia straddles the so-called ‘Pacific Ring of Fire,’ a highly seismically active zone where neighboring tectonic plates violently clash, resulting in a large number of earthquakes and volcanoes.