Data & credits

Where the map's data comes from, and what it's built with.

Every railway line, station, tunnel and viaduct shown here is taken directly from the open datasets below. The data is real and sourced from established public bodies and the OpenStreetMap community. Nothing on the map is invented or generated. Below is exactly where it comes from and the software that renders it.

Data sources

Railway lines, tunnels & viaducts: OpenStreetMap
The railway network geometry, names, tunnels, bridges and line types are extracted from OpenStreetMap via the Overpass API.
© OpenStreetMap contributors, licensed under the Open Database Licence (ODbL).
Stations: OpenStreetMap
Station locations and names (including heritage-railway stations) are taken from OpenStreetMap, the same source as the lines.
© OpenStreetMap contributors, licensed under the Open Database Licence (ODbL).
Live passenger trains: Rail Data Marketplace (Darwin)
The live trains layer is derived from National Rail's Darwin real-time train information (forecasts, formations and daily timetables), published by the Rail Delivery Group via the Rail Data Marketplace. Positions are estimated between timing points.
Contains data from National Rail / Rail Delivery Group.
Signalling, schedules & freight: Network Rail open data
Freight trains, signalling-based train positions and measured speeds use Network Rail's open data feeds: train movement reports (TRUST), train describer berth data (TD), the national schedule, and the SMART and CORPUS reference datasets.
Contains information licensed under the Open Government Licence v3.0 © Network Rail Infrastructure Ltd.
Rolling stock: Rail Data Marketplace (train consist)
The unit number on a train's card, and the rest of that unit's day, come from Network Rail's passenger train allocation and consist feed, derived from the industry's own rolling-stock allocation system. It is a plan rather than an observation, so the map words it as “booked”.
Contains data from Network Rail Infrastructure Ltd.
Timing point locations: Rail Data Marketplace (BPLAN Geography)
Where a train is drawn depends on knowing where the railway's timing points are. Stations come from NaPTAN and OpenStreetMap; the yards, loops, junctions and closed halts that freight runs between come from Network Rail's BPLAN planning geography, published on the Rail Data Marketplace by OpenTrainTimes Ltd.
Contains data from Network Rail Infrastructure Ltd, via OpenTrainTimes Ltd.
London Underground live trains: Transport for London (Unified API)
The Tube trains on the live layer come from TfL’s open arrivals feed, which gives each train’s next stations, a countdown to them and a note of where it is (“Between Bank and Liverpool Street”). TfL publishes no coordinates for Tube trains, so every position on the map is estimated from that countdown and placed along the line, and the map says so wherever those trains appear. This site is not affiliated with, endorsed by or an official service of Transport for London.
Powered by TfL Open Data. Contains OS data © Crown copyright and database rights 2016 and Geomni UK Map data © and database rights 2019.
Ticket prices: National Rail Enquiries (DTD fares)
The walk-up and Advance prices shown against a direct destination come from National Rail’s published fares data, taken from the National Rail Open Data portal. Prices are the published fares for the journey, not a live retail quote: an Advance price is the cheapest ever published for that route and may be dearer or sold out on the day, which is why it is shown as a “from” figure. This site is not affiliated with, endorsed by or an official service of National Rail Enquiries or the Rail Delivery Group.
Rail replacement bus positions: Bus Open Data Service and OS Open Roads
Where a rail replacement bus is drawn. Some of these buses are scheduled coach services that report their own position to the Department for Transport's Bus Open Data Service. Most are laid on for engineering work, report nothing anywhere, and are placed along the road between their calling points using Ordnance Survey's open road network and the times National Rail publishes.
Contains public sector information licensed under the Open Government Licence v3.0. Contains OS data © Crown Copyright and database rights 2026.
Timing point locations: NaPTAN
Live train positions are worked out against TIPLOCs, the railway's own timing point codes. Turning those into coordinates uses NaPTAN, the Department for Transport's national dataset of public transport access points, alongside OpenStreetMap.
Contains public sector information licensed under the Open Government Licence v3.0.
Station usage figures: Office of Rail and Road
How busy each station is, and the busiest destination from it, come from ORR's Estimates of station usage. They are estimates made from ticket sales rather than a headcount.
Contains information licensed under the Open Government Licence v3.0 © Office of Rail and Road.
Freight statistics: Office of Rail and Road
The forty-year history on the freight statistics page (freight moved by commodity, freight lifted, trains run, train kilometres by operator, cancellations and lateness) is ORR's Freight rail usage and performance, tables 1310, 1315, 1330, 1333, 1355 and 1365, compiled from Network Rail's records and refreshed here within a week of each quarterly release.
Contains information licensed under the Open Government Licence v3.0 © Office of Rail and Road.
Passenger statistics: Office of Rail and Road
Everything on the passenger statistics page that is not counted from the live map (journeys since 1872, passenger kilometres, fares, the sector, ticket-type and operator splits, and train and vehicle kilometres) is ORR's Passenger rail usage, tables 1210 to 1253, refreshed here within a week of each quarterly release. The same tables give the national average of people per train behind the "people on trains right now" estimate.
Contains information licensed under the Open Government Licence v3.0 © Office of Rail and Road.
Closed / former stations: Wikidata
The optional "closed / former stations" layer is built from Wikidata's record of UK railway stations no longer in service.
Wikidata, dedicated to the public domain (CC0).
County boundaries: ONS Open Geography Portal
The lost-railways-by-county pages sort the disused lines and closed stations by county using the Office for National Statistics' Counties and Unitary Authorities boundaries (December 2024), with unitary authorities folded into their ceremonial county.
Source: Office for National Statistics licensed under the Open Government Licence v3.0. Contains OS data © Crown copyright and database right 2024.
Station info links: Wikipedia & Google Maps
Clicking a station offers a link to its Wikipedia article and to its location on Google Maps. The article references come from OpenStreetMap / Wikidata; the pages themselves are external.
Wikipedia content © its authors (CC BY-SA); Google Maps © Google.
Timetable & departure links: Realtime Trains
Train popups link to the service's full timetable, and station popups to the live departure board, on Realtime Trains, an excellent independent service that goes far deeper than this map does. The pages are external and unaffiliated.
Realtime Trains © its operators.
Postcode search: postcodes.io
Postcode-to-location lookups use the free, open-source postcodes.io API, built on the ONS Postcode Directory.
Contains OS data © Crown copyright & database right; Royal Mail data © Royal Mail copyright & database right; National Statistics data © Crown copyright & database right (Open Government Licence).

Software & services

The open-source library that renders the interactive map.
BSD-3-Clause licence.
Serves the railway network as vector tiles from a single file, so a phone only ever holds the part of the network that is on screen.
BSD-3-Clause licence.
Base map tiles: OpenStreetMap & OpenFreeMap
The underlying street map behind the railway. The labelled base uses OpenStreetMap’s own tiles; the “Hide map labels” option uses OpenFreeMap’s vector tiles, built with OpenMapTiles from the same OpenStreetMap data.
© OpenStreetMap contributors. OpenFreeMap © OpenMapTiles, data from OpenStreetMap.
OpenFreeMap is run by one person, Zsolt Ero, and paid for by donations. It asks for no key, no account and no fee, and it serves this map every time you hide the labels. If you find that worth something, they take sponsorship the same way this site does.
Map label fonts: OpenMapTiles fonts
Open Sans glyphs, used for the tunnel and viaduct labels, and for station names when a line or route is singled out.
Open Sans, Apache Licence 2.0.
Analytics: Plausible
Privacy-friendly, cookieless visitor analytics, with no personal data or tracking cookies.

trainmap.co.uk is free and ad-free.
If it's useful, please consider

☕ Buy me a coffee