The majority of Indonesia's railways are located on the island of Java and carry both passengers and freight. Sumatra has four discontinuous railway networks, serving Aceh, North Sumatra, West Sumatra, South Sumatra and Lampung. One operational line is located in South Sulawesi.

Indonesia has developed plans for a national railway network, under which an additional of track would be constructed across Sumatra, Java, Kalimantan and Sulawesi. The project has been described as the country's largest railway undertaking since it gained independence from the Netherlands in 1945. Indonesia intends to extend the national railway network to by 2030. As of September 2022, the network covered .

Commuter railways operate in metropolitan areas across Java, notably in Jakarta, and in Medan, North Sumatra. Mass rapid transit and light rail transit systems have also been introduced in Jakarta and Palembang, South Sumatra.

Although road vehicles in Indonesia travel on the left, most trains operate on the right, a legacy of Dutch colonial rule.

Most Indonesian railways use gauge, although , and gauges have also been used. Newer lines in Sumatra, including Aceh, and in Kalimantan, Sulawesi and Papua use gauge. The Jabodebek LRT, Jakarta LRT, and Jakarta-Bandung HSR also use this gauge. Most electrified lines in the Jakarta metropolitan area use 1,500 V DC overhead electrification.

Indonesia's railways are operated primarily by the state-owned Kereta Api Indonesia (KAI), its commuter subsidiary KAI Commuter and its airport rail subsidiary KAI Bandara. Most railway infrastructure is owned by the Directorate General of Railways of the Ministry of Transportation. Railway operators pay track-access charges to use the railway infrastructure.

Various narrow gauge industrial tramways operate in Java and Sumatra, serving the sugarcane and oil palm industries.

History

The first railway line in Indonesia opened in 1867 and was initially laid to standard gauge size. The railways were gradually expanded by both the state and private companies.

Pre-Independence

The idea of building a railway in Indonesia emerged in the 1840s. Construction was initially proposed at the request of King Willem I for military purposes in Semarang and to facilitate the transport of agricultural products to warehouses in the city. The proposal was realised with the establishment of the Nederlandsch-Indische Spoorweg Maatschappij (NIS), which was incorporated on 27 August 1863. Railways in the Dutch East Indies were built primarily to facilitate the transport of agricultural products.

Construction of the first railway began with a groundbreaking ceremony on 17 June 1864 in Kemijen, East Semarang, at the site of Samarang Station (km 0), on the first section of the Samarang–Vorstenlanden (Yogyakarta) railway. The ceremony was led by the Governor-General of the Dutch East Indies, Mr. L.A.J.W. Sloet van de Beele. The line was completed on 10 August 1867.

Construction continued on the remaining sections of the line, connecting Tanggung, Gundih, Solo and Yogya NIS. A branch line was also built from Kedungjati to Ambarawa. The Samarang–Vorstenlanden line officially opened on 10 June 1872, and the initial network, comprising the Samarang–Vorstenlanden and Kedungjati–Willem I lines, was completed on 21 May 1873.

Horse trams began operating in the late 19th century. The Bataviasche Tramweg Maatschappij began operating a horse-drawn tramway in 1869, which became the forerunner of the Batavia tram network. The Solosche Tramweg Maatschappij began operating another horse-drawn tramway on the Purwosari–Boyolali line in 1892.

The concession for the Batavia–Buitenzorg line was announced in the Gouvernementesbesluit of 26 March 1864, no. 1. Writing in the newspaper Kompas, Josef Osdar stated that the concession was implemented in 1869, five years after it had been granted. According to Osdar, the NIS intended to build the line to gauge, while the colonial government favoured gauge. The NIS reportedly sought to monopolise the transport of plantation products and connect the line with the Samarang–Vorstenlanden line. The Batavia–Buitenzorg line began operating on 31 January 1873 using gauge.

The Staatsspoorwegen (SS), established by the colonial government in 1875, differed from the NIS. It was formed partly in response to the financial difficulties faced by the NIS. During this period, private companies also expressed interest in obtaining railway concessions, but generally favoured tramways because they were considered less expensive to construct. The SS was established to develop state railway lines in Java, beginning with the Surabaya–Pasuruan and Bangil–Malang. It adopted gauge for the state-owned network. The SS also sought to extend the Batavia–Buitenzorg line through Bogor, Bandung, Banjar and Yogyakarta to East Java.

Railway networks in Sumatra developed separately. The Deli Spoorweg Maatschappij operated in North Sumatra, the Atjeh Tram operated in Aceh, the Staatsspoorwegen ter Sumatra's Westkust in West Sumatra and the Zuid-Sumatra Staatsspoorwegen in southern Sumatra. The Staatstramwegen op Celebes operated the railway in South Sulawesi. Plans to establish another Staatsspoorwegen division, the Staatstramwegen in Tapanoeli, were not implemented. By the end of the 1920s, feasibility studies had also been conducted for proposed railways in Kalimantan, North Sulawesi, Lombok and Bali.

By 31 December 1928, railways and tramways in the Dutch East Indies, including Sumatra, Java and Sulawesi, had a total length of . The network in Java and Madura comprised of track: of railway, of railway, of railway and of tramway, excluding Jakarta's urban tramways. Forestry and plantation authorities had also constructed approximately of industrial railway, of which about served the sugar industry.

Japanese occupation and post-independence The Japanese occupation and the Indonesian War of Independence left Indonesia's railways in poor condition. A batch of 100 steam locomotives was ordered in 1950, and dieselisation began in 1953. By the 1980s, most mainline services had been dieselised. Electric multiple units were obtained from Japan beginning in the 1970s, replacing electric locomotives that were approximately 60 years old.

Since independence, all mainline railways in Indonesia have been managed by the state. The owners of private railways were initially compensated, and the system was fully nationalised in 1971.

Few new railway lines were built, with most construction instead involving the double-tracking and quadruple-tracking of existing lines. Most former tramway lines were closed, reducing the total length of the network from approximately to .

Regulator and operators Regulator The Directorate General of Railways, part of the Ministry of Transportation, is the sole regulator of Indonesia's rail transport system. Established on 5 August 2005 during the administration of President Susilo Bambang Yudhoyono and Minister of Transportation Hatta Rajasa, the directorate general is responsible for regulating rail transport in Indonesia. Its first director-general was Soemino Eko Saputro, a former chief executive of Perumka, the predecessor of Kereta Api Indonesia. During his tenure, Saputro became involved in a corruption case concerning procurement of electric multiple units from Japan. The case involved reported state losses of Rp20 billion.

Operators

Pre-independence

The first railway operator in the Dutch East Indies was the privately owned Nederlandsch-Indische Spoorweg Maatschappij (NIS), followed by the Bataviasche Tramweg Maatschappij. The colonial government established the state-owned Staatsspoorwegen in 1875. Numerous other railway and tramway companies subsequently began operating: Atjeh Tram Babat-Djombang Stoomtram Maatschappij Bataviasche Elektrische Tram Maatschappij Bataviasche Oosterspoorweg Maatschappij Bataviasche Verkeers Maatschappij Deli Spoorweg Maatschappij Javasche Spoorweg Maatschappij Kediri Stoomtram Maatschappij Madoera Stoomtram Maatschappij Malang Stoomtram Maatschappij Modjokerto Stoomtram Maatschappij Nederlands-Indische Spoorweg Maatschappij Nederlands-Indische Tramweg Maatschappij Oost-Java Stoomtram Maatschappij Pasoeroean Stoomtram Maatschappij Poerwodadie–Goendih Stoomtram Maatschappij Probolinggo Stoomtram Maatschappij Samarang-Joana Stoomtram Maatschappij Semarang-Cheribon Stoomtram Maatschappij Serajoedal Stoomtram Maatschappij Solosche Tramweg Maatschappij Staatstramwegen op Celebes

Japanese occupation

After the Dutch surrendered to Japan, all Dutch railway operators in Java were consolidated into a Japanese-established organisation called Rikuyu Sokyoku. In addition to operating the railways, the organisation was responsible for other forms of non-military land transportation. Railways in Sumatra were administered separately by the Imperial Japanese Navy which controlled the Malay Peninsula and Sumatra from its headquarters in Singapore.

Post-independence Passenger and freight railway operators in Indonesia include: PT Kereta Api Indonesia (KAI), which operates local, regional and intercity trains, as well as the Palembang and Jabodebek light rail systems PT Railink (KAI Bandara), a joint venture with Angkasa Pura II that operates airport rail services PT Kereta Commuter Indonesia (KAI Commuter), which operates commuter rail services PT Kereta Api Logistik (KAI Logistik), which provides rail freight and courier services PT MRT Jakarta, which operates the Jakarta MRT and is owned by the provincial government of the Special Capital Region of Jakarta PT LRT Jakarta, which operates the Jakarta LRT and is a subsidiary of Jakpro, a company owned by the provincial government of the Special Capital Region of Jakarta PT Angkasa Pura II, which operates the Soekarno-Hatta Airport Skytrain PT Kereta Cepat Indonesia–China, which operates the Jakarta–Bandung high-speed railway and is a joint venture between PT Pilar Sinergi BUMN Indonesia and Beijing Yawan HSR Co. Ltd.

Several agricultural and forestry companies also operate industrial railways:

Perum Perhutani, which operates the Cepu Forest Railway Perkebunan Nusantara, a state-owned plantation company PT Perkebunan Nusantara II, which operates palm-oil freight trains PT Perkebunan Nusantara IV, which operates palm-oil freight trains PT Perkebunan Nusantara IX, which operates sugarcane railways and a tourist train PT Bakrie Sumatra Plantations, part of Bakrie Group, which operates rubber and palm-oil freight trains PT Tanjung Enim Lestari, which operates pulp freight trains

Rolling stock

Preserved steam locomotives

Indonesia inherited various types of locomotives from its former railway companies. Only five steam locomotives remain operational, two located in the Ambarawa Railway Museum, two in Surakarta operating the Jaladara excursion train, and one at the Sawahlunto Railway Museum. Static steam locomotive displays are also displayed in the Transportation Museum (under the auspices of the Department of Transportation) in Jakarta's Taman Mini Indonesia Indah and at the Ambarawa Railway Museum in Central Java. Plinthed locomotives can be found in numerous cities and towns. Little other rolling stock has been preserved.

During the 1997 Asian financial crisis, the derelict steam locomotives remaining at former depots became valuable as scrap. By 2000, most locomotives that had not been plinthed or transferred to museums had been scrapped, reportedly without authorisation.

Six operational industrial steam locomotives remain, two of which are based at the Cepu Forest Railway, the largest concentration of operational preserved steam locomotives in Indonesia.