The quake hit central Sulawesi island at a shallow depth of some 10 kilometers (six miles), the US Geological Survey said.
The country’s national disaster agency briefly issued a tsunami warning before canceling it.
There were no immediate reports of deaths or injuries.
But the latest quake was a higher magnitude than those that killed hundreds on the island of Lombok earlier this year.
Friday’s tremor was centered 78 kilometers north of the city of Palu, the capital of Central Sulawesi province, but was felt in the far south of the island in its largest city Makassar.
Lisa Soba Palloan, a resident of Toraja, around 175 kilometers south of Palu, said locals felt several quakes Friday.
“The last one was quite big,” she said.
“Everyone was getting out their homes, shouting in fear.”
Indonesia is one of the most disaster-prone nations on earth.
The Southeast Asian archipelago nation lies on the Pacific “Ring of Fire”, where tectonic plates collide and many of the world’s volcanic eruptions and earthquakes occur.
This summer, a series of powerful quakes hit Lombok, killing over 550 people on the holiday island and neighboring Sumbawa.
Some 1,500 people were injured and about 400,000 residents were displaced after their homes were destroyed.
Indonesia has been hit by a string of other deadly quakes including a devastating 9.1 magnitude tremor that struck off the coast of Sumatra in 2004.
That quake triggered a tsunami that killed 220,000 throughout the region, including 168,000 in Indonesia.
The Boxing Day disaster was the world’s third-biggest quake since 1900 and lifted the ocean floor in some places by 15 meters.
Indonesia’s Aceh province was the hardest hit area, but the tsunami-affected coastal areas as far away as Africa.
Among the country’s other big earthquakes, a 6.3-magnitude quake in 2006 rocked a densely populated region of Java near the city of Yogyakarta, killing around 6,000 people and injuring 38,000.
More than 420,000 people were left homeless and some 157,000 houses were destroyed.
A year earlier, in 2005, a quake measuring 8.7 magnitudes struck off the coast of Sumatra, which is particularly prone to quakes, killing 900 people and injuring 6,000.
It caused widespread destruction on the western island of Nias.