Some 326 people were also injured, in varying degrees of severity, West Java Governor Ridwan Kamil told a news conference.
The quake struck 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 displaced 13,782 people – all of whom will be housed in 14 refugee camps. At least 2,345 houses were damaged.
Four schools and 52 houses collapsed or were badly damaged, according to the local office of the National Disaster Management Agency (BNPB). A mosque and a hospital were also damaged, according to the agency.
The BNPB said there was 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. The Metro TV news channel showed what appeared to be hundreds of victims being treated in a hospital parking lot.
He said an Islamic boarding school was also damaged, while communications were disrupted due to power outages.
Television footage showed residents huddled in front of buildings almost completely reduced to rubble, according to Reuters.
One, named only Muchlis, said he felt “a huge tremor” and the walls and ceiling of his office were damaged.
“I was very shocked. I feared there would be another earthquake,” Muchlis told Metro TV.
The BMKG said it was warned of a danger of landslides, especially in the event of heavy rain, since 25 aftershocks were recorded in the two hours following the earthquake.
Speaking at an earlier press conference, Governor Kamil said the death toll is expected to rise further.
“There are still many residents trapped at the incident sites, we assume the number of injured and dead will continue to increase over time,” Kamil said earlier on Monday.
Rescuers are currently unable to reach some of the trapped people, he said, adding that the situation remains chaotic with the possibility of further aftershocks to come.
Government authorities are building tents and shelters for the victims while meeting their basic needs, Kamil added.
Indonesia sits on the “Ring of Fire”, a band around the Pacific Ocean that triggers frequent earthquakes and volcanic activity. One of the most seismic zones on the planet, it stretches from Japan and Indonesia on one side of the Pacific to California and South America on the other.
In 2004, a magnitude 9.1 earthquake off the island of Sumatra in northern Indonesia triggered a tsunami that struck 14 countries, killing 226,000 people along the ocean coast Indian, more than half of them in Indonesia.