Some 326 people have also been injured, with varying degrees of severity, West Java Governor Ridwan Kamil said at a news conference.
The quake hit the Cianjur region in West Java on Monday at a depth of 10 kilometers (6.2 miles), according to the United States Geological Survey (USGS).
The earthquake has displaced 13,782 people – all of whom will be accommodated across 14 refugee camp sites. At least 2,345 homes have been damaged.
Four schools and 52 houses collapsed or were badly damaged, according to the local office of the National Agency for Disaster Management (BNPB). A mosque and a hospital were also damaged, according to the agency.
The BNPB said there is no risk of a tsunami, Reuters reported.
Herman Suherman, a government official in Cianjur, told media that some residents were trapped in the rubble of collapsed buildings. News channel Metro TV showed what appeared to be hundreds of victims being treated in a hospital parking lot.
It said that an Islamic boarding school was also damaged, while communications had been disrupted due to power outages.
TV footage showed residents huddled outside buildings almost entirely reduced to rubble, according to Reuters.
One, named only as Muchlis, said he felt “a huge tremor” and the walls and ceiling of his office were damaged.
“I was very shocked. I worried there would be another quake,” Muchlis told Metro TV.
The BMKG said warned of a danger of landslides, particularly in the event of heavy rain, as 25 aftershocks were recorded in the two hours after the quake.
Speaking at an earlier news conference, Governor Kamil said the death toll is likely to rise further.
“There are still many residents trapped at the incident sites, we assume that the injured and dead victims will continue to increase over time,” Kamil said earlier on Monday.
Rescuers are currently unable to reach some of those trapped, he said, adding that the situation remains chaotic with the possibility of further aftershocks to come.
The government authorities are currently building tents and shelters for the victims while attending to their basic needs, Kamil added.
Indonesia sits on the “Ring of Fire,” a band around the Pacific Ocean that sets off frequent earthquakes and volcanic activity. One of the most seismically active zones on the planet, it stretches from Japan and Indonesia on one side of the Pacific all the way across to California and South America on the other.
In 2004, a 9.1 magnitude quake off Sumatra island in northern Indonesia triggered a tsunami that struck 14 countries, killing 226,000 people along the Indian Ocean coastline, more than half of them in Indonesia.