A horseshoe curve is a class of climbing curve in a roadbed which reverses turn direction ( inflection) twice on either side of a single tight curve that varies through an angle of about 180 degrees or more.
Such curves are more commonly found in a railway line of travel but are also used in roads. The characteristic U shape, or even slight balloon shape, of such a curve resembles a horseshoe, hence the name. On roadways such curves, if the hard curve is tight enough, are typically called hairpin turns.
A horseshoe curve is a means to lengthen an ascending or descending grade and thereby reduce the maximum gradient. Grade or gradient is defined as the rise divided by the run (length) or distance, so in principle such curves add to length for the same altitude gain, just as would a climbing spiral around one or more peaks, or a climbing traverse (cutting) wrapping around an end of a ridge.
If the straight route between two points would be too steep to climb, a more circuitous route will increase the distance traveled, allowing the difference in altitude to be averaged over a longer track (or road) length. Unlike a spiral, a horseshoe curve does not involve the track crossing over itself, and the full horseshoe involves both relatively straight sections, curve deflections in both directions and tightly curved segment; while a spiral generally has a more uniform curvature. Obviously, a horseshoe also gives rise to a severe change in direction requiring another corrective curve to regain displacement in the overall direction of travel, while a spiral generally does not.
A horseshoe curve is sometimes used where the route bridges a deep gully. Deviating from a straight-line route along the edge of the gully may allow it to be crossed at a better location.
Horseshoe curves are common on railway lines in steeply graded or hilly country, where means must be found to achieve acceptable grades and minimize construction costs. As with spirals, the main limitation in laying out a horseshoe is keeping its radius as large as possible, as sharp curves limit train speed, and through increased friction, are harder on rails, requiring more frequent replacement of outer tracks.
- The Dovre Line, the main line of the Norwegian railway network, has a horseshoe within Grønbogen tunnel from Dombås at the steep hills to the Dovre plateau, standard gauge, single track. 
- The Flåm Line, Norway, has a double horseshoe, one inside a tunnel, one in the open, few kilometres below top station, standard gauge, single track.
- The Rauma Line, Norway, has a double horseshoe through the steep and narrow valley at Verma, one inside a tunnel and one that includes the Kylling Bridge, standard gauge, single track.
- Grybów, Poland has a horseshoe curve 2,5 km west of the town.
- Kalisz, Poland has a double horseshoe curve leading the tracks from a flat plateau down to the valley of the Prosna river.
- Between Jelenia Góra and Szklarska Poręba in Poland there is a five-times, elongated horseshoe curve (50°51′19"N, 15°34′17"E). Map
- Newcastle Quayside branch, a goods-only railway from the main line to the river quayside, through a steeply descending horseshoe tunnel.
- The Rhein-Ruhr S-Bahn in Germany has a horseshoe curve in Neviges, Velbert on the route between Essen and Wuppertal, known as the Prince William railway.
- The horseshoe curve on the West Highland Line in Scotland between Upper Tyndrum and Bridge of Orchy was built because the engineers of the railway couldn't afford to build a viaduct crossing the remote valley.
- In Slovakia there is a significant number of horseshoe curves on the Banská Bystrica to Turčianske Teplice railway track and on the railway from Zvolen to Turčianske Teplice. More than 20 tunnels and couple of horseshoe curves were built to overcome rough terrain and elevation differences.
- The first ever, and most famous is the four tracks built by the Pennsylvania Railroad (PRR), the Horseshoe Curve (Pennsylvania) that starts its climb along Kittanning Run, Pennsylvania due west of Altoona, PA, and crosses two runs and three mountain faces using three gaps of the Allegheny.
- Stanford Curve; Truckee, California; Union Pacific Railroad (originally Central Pacific Railroad, and then Southern Pacific Railroad).
- Five curves on the California Western Railroad climbing the coast range east of Fort Bragg, California 
- Ophir Loop; Ophir, Colorado; Rio Grande Southern Railroad – 3 ft (914 mm) gauge (abandoned)
- Coxo Curve; Cumbres, Colorado; Denver and Rio Grande Western Railway; 3 ft (914 mm) gauge
- Tanglefoot Curve; Cumbres, Colorado; Denver and Rio Grande Western Railway; 3 ft (914 mm) gauge
- Los Pinos Curve; Los Pinos, Colorado; Denver and Rio Grande Western Railway; 3 ft (914 mm) gauge
- Phantom Curve; Sublette, Colorado; Denver and Rio Grande Western Railway; 3 ft (914 mm) gauge
- Whiplash Curve; Big Horn, Colorado; Denver and Rio Grande Western Railway; 3 ft (914 mm) gauge
- Lava Loop; Lava, Colorado; Denver and Rio Grande Western Railway; 3 ft (914 mm) gauge
- Altura Curve; Altura, Colorado; Rio Grande, Pagosa and Northern; 3 ft (914 mm) gauge (abandoned)
- 66° curve; Moro Castle, Colorado; Uintah Railway; 3 ft (914 mm) gauge (abandoned) 
- Balloon Loop; Columbine, Colorado; Uintah Railway; 3 ft (914 mm) gauge (abandoned) 
- Hairpin Curve and Muleshoe Curve; McAndrews, Colorado; Uintah Railway; 3 ft (914 mm) gauge (abandoned) 
- Coles Curve; Coles, Pennsylvania; East Broad Top Railroad;– 3 ft (914 mm) gauge (out of service)
- Foss Creek, between Skykomish, Washington and the Cascade Tunnel.
- Muleshoe Curve, near Duncansville, Pennsylvania; Pennsylvania Railroad.
- Chorro, California on the grade from San Luis Obispo to Cuesta Pass, a route owned by the Union Pacific Railroad and used by Amtrak's Coast Starlight (Los Angeles, CA to Seattle, WA).
- The Cantara Loops between Dunsmuir, California and Mount Shasta, California. Map
- East of Oakridge, Oregon on the Cascade Line.
- Notch Hill, on CP's Shuswap Sub near Salmon Arm, British Columbia.
- "Mance Curve," between Meyersdale & Hyndman, PA along Sand Patch Grade (a section of track that's part of CSX Transportation's Keystone Subdivision) which is used both by freight trains and Amtrak's Capitol Limited (Chicago, IL-Washington, DC)
- Helmstetter's Curve; Corriganville, Maryland, between Cumberland and Frostburg, Maryland, at Cash Valley Road; former Western Maryland Railway Connellsville Extension, now the Western Maryland Scenic Railroad.
- Swain, New York; Pittsburg, Shawmut, & Northern Railroad (abandoned)
- Richburg, New York; Pittsburg, Shawmut, & Northern Railroad (abandoned)
- Kamaishi Line of East Japan Railway Company in Japan, has a horseshoe curve from Kamiarisu Station down to Rikuchū-Ōhashi Station ("down" on the elevation and registration of direction of the line).
- Nanning–Kunming Railway in China, inside Yiliang County, located in the east of Yiliang Town. 
The Cougal Spiral is a feature of the North Coast Railway in Australia that connects New South Wales with Queensland through Richmond Gap. The railway lines needs to climb at a steady ruling gradient from Kyogle to the summit at a tunnel at the border between the two states. The border is also at the watershed. The line is single tracked.
- Picton railway station, New South Wales, turns back on itself at about 225 degrees.
- The Raurimu Spiral in New Zealand has a horseshoe curve as the first part of the climb.
- The U-bend south of Maddingly, Victoria takes a large detour to descend 100m.
- Turangarere, New Zealand North Island Main Trunk line near Hihitahi.
- Avslutningsrapport for Dovrebanen: avgit til Den kgl. norske regjerings departement for de offentlige arbeider. Oslo: Baneforlaget. 1926 (original), 2000 (reprint). ISBN 8291448353.
- Crump, Spencer (1998). Redwoods, Iron Horses, and the Pacific (Fifth ed.). Fort Bragg, California: California Western Railroad. p. 60. ISBN 0-918376-12-2.
- Bender, Henry E, Jr. (1970). Uintah Railway: The Gilsonite Route. Berkeley, California: Howell-North Books. p. 42. ISBN 0-8310-7080-3.