The quake struck at a depth of 52 kilometres under the Molucca Sea at about 3:40 pm (0740 GMT), between the islands of Sulawesi and Halmahera, the US Geological Survey said.
Mochammad Riyadi, a senior official from Indonesia's meteorology, climatology and geophysics agency, said the quake was felt strongly on Halmahera, which is part of the Maluku Island chain.
However he added there were no immediate reports of casualties or damage and no tsunami alert was issued.