The quake hit at a depth of 37 kilometres (23 miles) at 5:37 pm (local time) close to Pulau Siberut, part of the Mentawai Islands, off the west coast of vast Sumatra island, said the USGS.
An official from Indonesia's meteorological, geophysics and climatology agency Benny, who like many Indonesians goes by one name, said that there was no potential for a tsunami.
The quake was felt in several cities in West Sumatra province, including the provincial capital Padang, but there were no reports of damage, he said.
A huge undersea quake in 2004 triggered a tsunami that killed more than 170,000 people in Aceh province, on western Sumatra island, and tens of thousands more in other countries with coasts on the Indian Ocean.