My Adventure Maps
Junction-safe

Snap to Roads

Correct GPS drift by snapping your route onto the roads it was actually run or ridden on. Handles junctions correctly, and leaves trail or off-road sections untouched.

Drop your GPX, TCX or FIT file here

or click to browse

or
Junction-safe matching
Configurable snap range
Free, no account

Good to know

Why a Y-junction needs more than "nearest road"

The obvious way to snap a GPS point to a road is to find the closest one and move the point there. That works fine on a long straight stretch, but it falls apart exactly where it matters most: where two roads run close together, or split apart at a Y. At that point, GPS noise alone can make either road the "nearest" one from one sample to the next, so a naive snap doesn't correct the route, it makes it worse, visibly zig-zagging between two roads that the person only ran or rode on one of.

This tool uses map-matching instead, the same underlying technique turn-by-turn navigation apps use to keep a moving dot on the correct road. Rather than judging each point on its own, it looks at the whole sequence of points together and finds the single most plausible path through the real road network that could have produced them, weighing in the direction of travel and, when your file has timestamps, how fast that would have to be. A route that continues past a junction onto one specific branch stays on that branch in the result, because switching to the other one wouldn't be a plausible path for the rest of the sequence, not just a nearest-point coincidence at one moment.

The snap distance keeps trail sections honest

None of that helps if the route genuinely isn't on a road, a trail through a park, a path across a field, a stretch of open water. So every point also gets a maximum snap distance: if nothing in the road network is within it, that point is left exactly as your device recorded it rather than being pulled onto the nearest street regardless of how far away it actually is. 10 metres is a sensible default for ordinary GPS accuracy, and you can widen or narrow it before snapping depending on how noisy your device tends to be and how conservative you want the result to be.

FAQ

Frequently asked questions

Why would I snap a GPS track to roads?

Consumer GPS is only accurate to a few metres, sometimes tens of metres under tree cover or between buildings. On a poster or a heatmap that shows up as a faint wobble or zigzag along an otherwise straight road. Snapping moves each point onto the road it was actually recorded on, so the line reads as clean as the road really is.

How does it avoid jumping back and forth at a junction where two roads run close together?

It doesn't snap each point to whichever road happens to be nearest at that instant — that's exactly what would flip-flop at a Y-junction, since either branch is the nearest neighbour at different points along it. Instead it uses map-matching, which finds the single most plausible path through the whole road network for the entire route at once, the same technique GPS navigation apps use to keep your position on the correct road while driving.

What happens on a trail run or somewhere else with no nearby road?

Nothing — that's what the snap distance controls. Any point with no matching road within that distance is left exactly as recorded, so a route that leaves the road network for a trail, a field or open water stays true to what you actually did instead of being dragged onto the nearest street.

What snap distance should I use?

10 metres works well for most GPS-recorded activities and is the default. Widen it if your device runs a bit noisier than that (dense tree cover, a narrow street between tall buildings); narrow it if you want to be conservative about which points get touched at all.

Is my route data uploaded anywhere?

Reading the file, converting formats and generating the download all happen in your browser, same as the other tools here. Finding and matching nearby roads is the one part that can't run offline: your coordinates are sent to Mapbox, on their free tier, purely to find the road network near your route and correct the points. That's also why the map on this page is a Mapbox map rather than the OpenStreetMap one the other tools use. No file, name or account is involved.

Does it work on GPX, TCX and FIT files?

Yes. Upload any of the three, and download the corrected result in whichever of the three you need — they don't have to match.

Turn that route into a poster

Once it's snapped to the road, the same file works straight in the map editor.

Open the editor →