The quake struck at 2:05 pm local time (0705 GMT), 93 kilometres (57 miles) south of Krajan Tambakrejo village in east Java province at a depth of 59 kilometres, the USGS said.
Mochammad Riyadi, from the Indonesian meteorology, climatology and geophysics agency, said there were no reports of casualties or damages.
"The quake epicentre was in the sea, but there's no risk of a tsunami. It's quite a distance from nearby cities," he told AFP.
An AFP correspondent in Banyuwangi city in east Java said that mild shaking could be felt for about five seconds.
Indonesia sits on the Pacific "Ring of Fire" where tectonic plates collide, causing frequent seismic and volcanic activity.
Get Breaking news, live coverage, and Latest News from India and around the world on NDTV.com. Catch all the Live TV action on NDTV 24x7 and NDTV India. Like us on Facebook or follow us on Twitter and Instagram for latest news and live news updates.