Central Java railway history

1864–1873

How Java’s First Railway Opened from Semarang to Tanggung

Follow the 1867 opening of the 25-kilometre Semarang–Tanggung railway, its port spur and the later connections to Solo and Yogyakarta.

Diagram distinguishing the first Semarang–Tanggung section, the port spur and the inland extensions to Solo and Yogyakarta.
1864
Construction begins
25 km
First open section
10 August 1867
Semarang–Tanggung opens

The short answer

On 10 August 1867, a 25-kilometre railway opened between Semarang and Tanggung. The Dutch East Indies’ first railway grew in stages after that opening. A spur connected it to Semarang’s port in 1868 and the inland route eventually reached Solo and Yogyakarta.

Compare the records

How the first route grew

KAI’s heritage history records inland progress and the port connection as separate works.

Early openings on the Semarang railway
SectionDateLength in KAI’s chronology
Semarang–Tanggung10 August 186725 km
Tanggung–Kedungjati19 July 18689 km
Semarang–port20 July 18682 km
Kedungjati–Solo10 February 187074 km

Chronology

A timeline of the turning points

  1. Construction begins in Semarang

    The railway company begins building the inland line.

  2. First section opens

    Trains can operate between Semarang and Tanggung.

  3. Network grows in two directions

    The next inland section reaches Kedungjati and a separate spur connects Semarang with the port.

  4. Line reaches Solo and Yogyakarta

    The extensions create a longer corridor between the coast and inland cities.

The first 25 kilometres

Construction began at Semarang in 1864 under the private Nederlandsch-Indische Spoorweg Maatschappij, known as NISM. The first operating section reached Tanggung in August 1867. Although the project was intended to reach further inland, it opened in sections. The first date refers to the part open to traffic, while the later dates document how the wider route was assembled.

Sources for this section: [1] · [2] · [3]

Why the two-kilometre spur mattered

KAI dates the connection to Semarang’s port to 20 July 1868, the day after the Tanggung–Kedungjati extension opened on the inland side. The spur was much shorter than the inland extensions, but it made a different part of the journey possible. A train could connect goods arriving from central Java with a place to transfer them to ships. The heritage account records 9,039 tonnes of sugar carried from Solo to the port in 1870, alongside coffee and indigo.

Sources for this section: [1]

The railway also carried passengers

The operator’s historical account lists stations and smaller stopping places along the Semarang–Solo route. It also records ticket sales across three classes in 1870. Most of the tickets it lists were in third class. Freight figures explain why the port link mattered economically, while ticket records show another use of the same track. Reading both sets of material gives a broader picture of what the railway did after the first section opened.

Sources for this section: [1] · [2]

Continue the chronology

Connected biographies

People connected to this history

Quick answers

Common questions

When did the first railway open in Java?
The Semarang–Tanggung section opened on 10 August 1867.
Did the first section reach Solo?
The first section ended at Tanggung. KAI dates the extension to Solo to 10 February 1870.

Primary and institutional sources

How this history was checked

Dates, legal milestones and historical claims are checked against the official and institutional records below. This article was reviewed on 19 November 2026.

  1. KAI HeritageThe Solo–Semarang Sugar Industry Railway Line
  2. KAIHeritage Week account of early rail routes
  3. KAI HeritageKAI head office history