There have been no immediate reports of damage.
The USGS said the earthquake struck at 19:49 local time (12:49 GMT). It said the epicentre was 808km (502 miles) south-west of the city of Padang, and 10km deep.
Indonesian officials issued a tsunami warning for the regions of West Sumatra, North Sumatra and Aceh.
Australia also issued a tsunami warning for Cocos Island and Christmas Island, in the Pacific and put a watch in place for the western Australian coast, including the city of Perth.