A branch line is a secondary railway line which branches off a more important through route, usually a main line. A very short branch line may be called a spur line. David Blyth Hanna, the first president of the Canadian National Railway, said that although most branch lines cannot pay for themselves, they are essential to make main lines pay.
The smallest branch line that is still in operation in the UK is the Stourbridge Town Branch Line from Stourbridge Junction going to Stourbridge Town. Operating on a single track, the journey is 0.8 miles (1.3 kilometres) long and the train takes around two and a half minutes to complete its journey.
In North America, little-used branch lines are often sold by large railroads to become new common carrier short-line railroads of their own. Throughout the United States and Canada, branch lines link smaller towns too distant from the main line to be served efficiently, or to serve a certain industrial site such as a power station either because of a location away from the main line or to reduce congestion. They were typically built to lower standards, utilizing lighter rail and shallow roadbeds when compared to main lines. In the United States, abandonment of unproductive branch lines was a byproduct of deregulation of the rail industry through the Staggers Act.
The Princeton Branch is a commuter rail line and service owned and operated by New Jersey Transit (NJT) in the U.S. state of New Jersey. The line is a short branch of the Northeast Corridor Line, running from Princeton Junction northwest to Princeton with no intermediate stops. Also known as the "Dinky Line", at 2.9 mi (4.7 km) it is the shortest scheduled commuter rail line in the United States. The run takes 4 minutes, 47 seconds. 
From 1990 to 1996, the section of the North South Line between Jurong East and Choa Chu Kang stations was operated as a separate line, known as the Branch Line. It was merged into the North South Line with the opening of the Woodlands Extension in 1996.
Two extensions to the MTR rapid transit network were built as branches of existing lines: the Lok Ma Chau Spur Line to Lok Ma Chau Station, which opened in 2007; and the South Tseung Kwan O Spur Line to LOHAS Park Station, opened in 2009.
New Zealand once had a very extensive network of branch lines, especially in the South Island regions of Canterbury, Otago, and Southland. Many were built in the late 19th century to open up inland regions for farming and other economic activities. The branches in the South Island regions were often general-purpose lines that carried predominantly agricultural traffic, but lines elsewhere were often built to serve a specific resource: on the West Coast, an extensive network of branch lines was built in rugged terrain to serve coal mines, while in the central North Island and the Bay of Plenty, lines were built inland to provide rail access to large logging operations.
Today, many of the branch lines have been closed, including almost all of the general-purpose country lines. Those that remain serve ports or industries far from main lines such as coal mines, logging operations, large dairying factories, and steelworks. In Auckland and Wellington, two branch lines in each city exist solely for commuter passenger trains. For more, see the list of New Zealand railway lines.
- Hanna, David Blyth, Macmillan 1924
- Dow, Andrew, Dow's Dictionary of Railway Quotations, JHU Press 2006.
- Rosenbaum, Joel; Tom Gallo (1997). NJ Transit Rail Operations. Railpace Newsmagazine.
- "Picks and Pans Review: Princeton Junction & Back", People, vol. 11 no. 13, April 2, 1979, retrieved April 15, 2012
- Schultz, Bonnie (June 2011). "Arts and Transit: NJ Transit Weighs In". AllPrinceton.com. Retrieved April 15, 2014.
- Frassinelli, Mike (June 25, 2013). "Historic Princeton 'Dinky' line train station to move for arts center". The Star-Ledger. Retrieved 2013-06-26.