The 5.6 magnitude quake struck Cianjur town in West Java, at a shallow depth of 10km (six miles), according to US Geological Survey data.
Scores of people were rushed to hospital, with many treated outside.
Rescuers were working into the night to try to rescue others thought to still be trapped under collapsed buildings.
The area where the quake struck is densely populated and prone to landslides, with poorly built houses reduced to rubble in many areas.
West Java governor Ridwan Kamil confirmed to local media that 56 people had died and more than 700 were injured.
He said the numbers of injuries and fatalities are likely to increase because there are “a lot of people” still trapped at the scene, with some areas cut off by landslides.
Earlier Herman Suherman, the head of administration in Cianjur town, said most injuries were bone fractures sustained from people being trapped by debris in buildings.
“The ambulances keep on coming from the villages to the hospital,” he was quoted by AFP news agency as saying. “There are many families in villages that have not been evacuated.”
Many of the injured were treated outside after the hospital was left without power for several hours following the quake, West Java’s governor said.
Dozens of buildings had been damaged in Cianjur region, the National Disaster Mitigation Agency said in a statement. They include a hospital and an Islamic boarding school.
The tremor could also be felt in the capital Jakarta about 100km away, where people in high-rise buildings were evacuated.
Office workers rushed out of buildings in the civic and business district during the tremor, which started at 13:21 Western Indonesian time (WIT) on Monday, the agency said.
“I was working when the floor under me was shaking. I could feel the tremor clearly. I tried to do nothing to process what it was, but it became even stronger and lasted for some time,” lawyer Mayadita Waluyo told AFP.
An office worker named Ahmad Ridwan told news agency Reuters: “We are used to this [earthquakes] in Jakarta, but people were so nervous just now, so we also panicked.”
Earthquakes are common in Indonesia, which sits on the “ring of fire” area of tectonic activity in the Pacific. The country has a history of devastating earthquakes and tsunamis, with more than 2,000 killed in a 2018 Sulawesi quake.