Indian Railways boasts one of the world’s largest railway networks, spanning over 67,000 kilometers.

Rail transport in India consists of primarily of passenger and freight shipments along an integrated rail network. Indian Railways (IR), 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 in major metros.
Majority of the metro urban rail networks are operated by independent bodies constituted for the purpose of the respective operations. Private owned rails 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 total route length of 68,907 km (42,817 mi), with more than 129,000 km (80,000 mi) of track and 8,000+ stations and is the fourth-largest in the world. It is one of the busiest networks in the world, transporting more than 11 billion passengers and 1.416 billion tonnes of freight annually. As of October 2023, more than 60,813 km (37,787 mi) of all the routes have been electrified with 25 KV AC electric traction. The rolling stock consisted 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 1949, the Great Indian Peninsular Railway was incorporated in 1849 with a guarantee system providing free land and guaranteeing five-percent rates of return to private English companies building railways was finalized on 17 August 1849. 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 1,676 mm (5 ft 6 in) broad gauge ran for 34 kilometres (21 mi) 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 39 km (24 mi) from Howrah, near Kolkata, to Hoogly on 15 August 1854. The construction of 97 km (60 mi) 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 Eastern Bengal Railway in 1858. The Carnatic Railway was founded in 1869. 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 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–1946: Electrification and further expansion
The first railway budget was presented in 1924 in India. 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 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.

1947–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. 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 1969, the Government of India announced the introduction of a new express train capable of reaching speeds of up to 120 km/h (75 mph) 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 130 km/h (81 mph).
1984–present: Rapid transit and later developments
A typical red-colored ICF coach used by the Indian Railways till the late 1990s. 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, Gatimaan Express, then India’s fastest train with a maximum speed of 160 km/h (99 mph), made its first run from New Delhi to Agra.

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 would be electrified 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. Introduced in 2019, Vande Bharat Express operating on a train-set built by ICF, is the fastest train in India
Starting in the 2010s, various infrastructure modernization projects have been undertaken including high-speed rail, redevelopment of 400 stations, doubling tracks to reduce congestion, refurbishing of coaches, Global Positioning System (GPS)-enabled tracking of trains and modernization of locomotives. .