Many others were injured and many bodies trapped in the carriages, witnesses told local television.
The crash happened before dawn, when a train from the capital Jakarta hit a stationary train in Petarukan.
Officials said the most likely reason for the accident was a signalling error.
"The suspected cause of the accident was a mistake in the traffic management system," national police spokesman Iskandar Hasan said.
The train from the capital was heading to Surabaya when it crashed into the back of another train bound for Semarang that was stationary at a platform, about 0300 on Saturday (2000GMT Friday).
Most of the dead and injured were in three carriages which were derailed and overturned.
At least 40 people are reported injured, many with broken bones or burns.
Add new comment