Rail transport in India consists primarily of passenger and freight shipments along an integrated rail network. Indian Railways, a statutory body under the ownership of the Ministry of Railways of the Government of India, operates India's national railway system. It is the primary owner and operator of rail operations throughout the country, including suburban rail systems in major metropolitan cities. Economic studies indicate the positive impact of the Indian railway network on the economy of the country.

The majority of the urban metro rail networks are operated by independent bodies constituted for their respective operations. Privately owned railways exist in few places, mostly used to connect freight to the integrated rail network. Inter-city rail services are operated primarily by Indian Railways, though efforts have been made to introduce privately operated trains as recently as 2022.

, the national rail network comprised a total route length of , with more than of track and 8,000+ stations and is the fourth-largest in the world. It is one of the busiest networks in the world, and transported more than 11 billion passengers and 1.512 billion tonnes of freight. , more than of all the routes have been electrified with 25 KV AC electric traction. The rolling stock consists of 318,196 freight wagons, 84,863 passenger coaches, 14,781 locomotives and other multiple units owned by Indian Railways apart from rail-sets operated by metro rail corporations.

History 1832–1852: Industrial railways In 1832, the proposal to construct the first railway line in India at Madras was made. In 1835, a railway track was constructed between Red Hills and Chintadripet in Madras and became operational in 1837. It was hauled by a rotary steam engine imported from England and was used for ferrying granite.

The Madras Railway was established in 1845. Temporary railway lines were built such as the Godavari Dam Construction Railway at Dowleswaram by Arthur Cotton to supply stone for the construction of a dam over the Godavari River in 1845 and the Solani aqueduct railway, built by Proby Cautley in Roorkee to transport construction materials for an aqueduct over the Solani river in 1851. On 1 August 1849, the Great Indian Peninsula Railway was incorporated with a guarantee system providing free land and guaranteeing five-percent rates of return to private English companies building railways. In 1852, a steam locomotive imported from England was tried at Byculla.

1853–1924: Passenger railways and expansion

In 1853, the first passenger train on broad gauge ran for between Bombay and Thane which had 14-carriages carrying 400 people, hauled by three steam locomotives: the Sahib, Sindh and Sultan. The Great Southern of India Railway Company was established with its headquarters in England in 1853. The Thane viaducts, the first railway bridges, were built over the Thane Creek when the Mumbai-Thane line was extended to Kalyan in May 1854. Eastern India's first passenger train ran from Howrah, near Kolkata, to Hoogly on 15 August 1854. The construction of line in the South between Royapuram in Madras and Arcot started in 1853, which became operational on 1 July 1856. The first workshops were established by GIPR at Byculla in 1854 and Madras Railway at Perambur in 1856. The Bombay, Baroda, and Central India Railway (BB&CI) was incorporated in 1855 and the Eastern Bengal Railway in 1858. The Carnatic Railway was founded in 1869. On 24 February 1873, a horse-drawn tram opened in Calcutta between Sealdah and Armenian Ghat street. In 1875, a railway line was opened in between Mokama and Darbhanga by the local ruler of Raj Darbhanga through Tirhut Railway. On 9 May 1874, a horse-drawn tramway began operation in Bombay between Colaba and Parel. The Great Southern of India Railway and the Carnatic Railway merged in 1874 to form the South Indian Railway. In 1879, the Nizam's Guaranteed State Railway was established which built railway lines across the then Hyderabad State. In 1877, an Ajmer built F-1/734 Steam Locomotive became the first indigenously built locomotive in India. East Coast State Railway was established in 1890. In 1897, lighting in passenger coaches was introduced with the Jodhpur Railway, the first to introduce electric lighting as standard fixtures. In 1908, Madras Railway merged with Southern Mahratta Railway to form the Madras and Southern Mahratta Railway. Pamban bridge, the first sea bridge was opened on 24 February 1914. In 1920, electric lighting of signals was introduced between Dadar and Currey Road in Bombay.

1925–1949: Electrification and further expansion

The first railway budget was presented in 1924. The Oudh and Rohilkhand Railway was merged with the East Indian Railway Company (EIR) in the same year. On 3 February 1925, the first electric train ran between Victoria Terminus (VT) and Kurla, hauled by a SLM electric locomotive on 1500 V DC traction. Later, the VT–Bandra section was electrified and the first electric multiple units (EMU) were introduced in with 1.5KV DC units imported were from Cammell Laird and Uerdingenwagonfabrik. On 1 April 1929, Grand Trunk Express commenced operations between Peshawar in the North Western Railway and Mangalore with two coaches detached and connected to Madras further. The Frontier Mail made its inaugural run between Bombay and Peshawar in 1928. Technical advancements led to automatic colour light signals that become operational between Bombay and Byculla in 1928. In the subsequent years, the route from Bombay to Poona was electrified and in June 1930, the first deluxe train, Deccan Queen began running, hauled by a WCP-1 locomotives with seven coaches along the route. The Grand Trunk express commenced operating as a dedicated daily train between Madras and Delhi from 1 September 1930. Chennai suburban railway started operating in 1931 with a single metre gauge line from Chennai Beach to Tambaram. In 1944, all the railway companies were taken over by the Government.

Indian railway classification Beginning in 1926 and for statistical purposes, the Government of British Raj classified Indian railway systems according to three classes. It was a similar system to the Railroad classes in North America. Class I Railways with gross annual earnings of over 5,000,000 INR Class II Railways with gross annual earnings of between 1,000,000 and 5,000,000 INR Class III Railways with gross annual earnings of under 1,000,000 INR Trams, industrial and port railways were recorded separately and independently of turnover. In terms of net revenue, East Indian Railway was the largest company in 1927 with 86,881,000 rupees. Followed by the North Western State Railway with 57,343,000 rupees and the Great Indian Peninsula Railway with 56,215,000 rupees. No further reclassification was carried out after 1942, but the rankings remained in use until the mid-1950s.

1950–1983: Zonal re-organisation and further developments The first locomotive manufacturing unit at Chittaranjan was commissioned in 1950. In December 1950, the Central Advisory Committee for Railways approved the plan for re-organising Indian Railways into six regional zones with the Southern (14 April 1951), Central (5 November 1951), and Western (5 November 1951) zones being the first to be created. On 14 April 1952, the Northern Railway, the Eastern Railway and the North Eastern Railway were created. In 1952, fans and lights were mandated for all compartments in passenger trains, and sleeping accommodations were introduced in coaches. In 1953, the Indian Railways completed a hundred years of operation, which was commemorated by multiple events and a commemorative postage stamp. The first diesel locomotive used in India was fabricated by North British Locomotive Company in 1954. On 1 August 1955 the South-Eastern Railway was split from the Eastern Railway, and, the following year, divisional systems of administration were set up for the various regional zones. The first rail coaches were manufactured in India from 1956 when the Integral Coach Factory was established at Madras. In 1956, the first air-conditioned train plied between Howrah and New Delhi. In 1958, the North-Eastern Railway split to form a new Northeast Frontier Railway.

In 1957, Indian Railways adopted 25 kV AC traction with the first trial runs operating with the WAM-1 locomotives in 1959 and commercial services beginning in August 1960. In 1960, the Railway Board of India commissioned a study to increase the speed of passenger trains to with an intermediate stage of . Research Design and Standards Organisation (RDSO) started work on the same in 1962 with field trials commencing in 1967 with coaches manufactured by the Integral Coach Factory at Madras and hauled by diesel locomotives. The first containerized freight rail transport began between Bombay and Ahmedabad in 1966. In 1966, the electrification of several suburban tracks around Delhi, Madras, and Calcutta were completed with the 25 kV AC system. In 1969, the Government of India announced the introduction of a new express train capable of reaching speeds of up to in the railway budget and the first Rajdhani Express was flagged off from New Delhi to Howrah in March 1969. In 1974, Indian Railways endured a 20-day strike. In 1979, the Main Line Electrification Project was reconstituted into the Central Organisation for Railway Electrification (CORE). In 1980, the WAP-1 electric locomotives reached a speed of .

1984–present: Rapid transit and later developments

The first metro rail was introduced in Calcutta on 24 October 1984 with the line between Esplanade and Bhowanipore. In 1986, computerized ticketing and reservations were introduced by Indian Railways. In 1988, the first Shatabdi Express was introduced between New Delhi and Jhansi. Two years later, the first self-printing ticket machine (SPTM) was introduced in Delhi. In 1993, air-conditioned three-tier and sleeper were introduced. In 1995, Chennai MRTS became the first operational elevated railway line in India. In 1995, Delhi Metro Rail Corporation, a joint venture between Government of India and Government of Delhi was established. Centralized computer reservation system was deployed in Delhi, Mumbai and Chennai in September 1996, coupon validating machines (CVMs) were introduced at Mumbai CSMT in 1998 and the nationwide concierge system began operation on 18 April 1999. In 1999, the South East Central Railway zone was established and on 6 July 2002, the East Coast, South Western, South East Central, North Central, and West Central zones were created.

The Indian Railways website went online in February 2000. Indian Railways Catering and Tourism Corporation (IRCTC) was incorporated in 1999, and online ticketing was introduced on 3 August 2002 through IRCTC. The first line of the Delhi Metro was inaugurated on 24 December 2002. In 2012, Western Railway switched completely to AC traction with Central Railway following it in 2016. On 1 February 2014, Mumbai Monorail became the first operational monorail system in India. In 2015, the first compressed natural gas (CNG) powered trains were rolled out. On 5 April 2016, Gatiman Express, then India's fastest train with a maximum speed of , made its first run from to .

The central government approved the merger of the Rail and General budgets from 2017. On 31 March 2017, Indian Railways announced a target of electrifying the entire rail network by 2023. In March 2020, Indian Railways announced a nationwide shutdown of passenger service to combat the COVID-19 pandemic in India with the freight operations continuing to transport essential goods. The railways resumed passenger services in a phased manner in May 2020.