Video footage broadcast on Friday by MetroTV and Kompas TV news channels showed some train carriages had derailed completely while passengers were being helped out of others.
The four dead were crew members, said Ibrahim Tompo, a spokesman for West Java province police, adding that a total of 478 passengers were aboard the trains.
Two crew members had died after they were squeezed between carriages, Ibrahim said.
"But one body still could not be evacuated because it was still buried in the debris from the cars," he said.
Ambulances gathered to take the injured to hospital, police said, following the collision at 6.03am (1103 GMT) near the provincial capital of Bandung.
The cause of the crash was not immediately clear but train operator PT KAI and the provincial government said they would investigate, along with transport safety officials.
Land transport accidents are common in Indonesia.Â
A train crash in 2010 killed 36 people, the deadliest in recent years.
In December last year, a commuter line hit a car near Bandung, killing five people while in November, 11 people died after a collision between a train and a minibus in East Java province.