Skip to content

Trail Router

What is Trail Router?

Trail Router helps you discover new running routes. Our routing algorithm prefers paths that go through parks, forests or by water, and avoids busy roads wherever possible.

How do I use Trail Router?

Just tap on the map to set a start point (or long-press on mobile), and Trail Router will automatically create you a 5km (3.1 mile) round-trip route (one that starts and ends at the same location). You can adjust the desired distance using the drop down list.

You can also manually create your own route. Select the 'Point to Point' option, and then tap the map to set your waypoints. Alternatively, you can use the box at the top-left to search for locations.

Sometimes we will generate multiple routes for you. In this case, use the left and right arrows at the bottom of the screen to jump between them.

By default, Trail Router will create a route that follows 'green' paths and roads. You can configure this behaviour (as well as preferences for hilly areas, lit streets and repetition) in the settings menu.

Why did you make it?

It was born out of a frustration I had whilst travelling frequently on business trips to new cities. I'd often want to go for a run, but didn't know the city and was fairly short on time. This typically led to me manually plotting a running route on Google Maps or MapMyRun, which was a time consuming and manual process if you wanted to find a picturesque route that was actually runnable (i.e. not blocked off by impassable roads) and fit within my desired distance.

Essentially, I wanted to be able to say "Give me a round-trip route that's roughly 10km, and features as much nature as possible". This is one of the things that Trail Router can do.

The route that's been generated for me is way too long, why?

Trail Router favours greenery and other nature in its routes, at the expense of distance. You can dial down the effects of this by clicking on the settings cog and dialing "Prefer green areas" down. Even with this set to 0%, Trail Router will still bias against busy roads, but the route will be far more direct.

What do the routing preferences do?

Prefer green areas: This allows you to set a preference for how 'green' you want your route to be. It tells the routing engine to prefer paths and streets that are surrounded by nature, such as parks, forests, lakes and rivers. So a path that is surrounded entirely by forest will always be chosen over a path that is not. You can disable the it by moving the slider all the way to the left.

Hills preference: This allows you to set a preference for how hilly you want your route to be. Setting the slider to the far left means 'avoid hills at all costs', setting it in the middle means 'no preference for hills either way', and setting it to the far right means 'prefer hills wherever possible'.

Avoid repetition: When ticked, this option tells the routing engine to try to avoid using the same 'way' twice. Note that it does not completely prevent it; the same way can still be used as a last resort. This option is useful when you're creating a round-trip route back to your home location and you want to avoid big out-and-back sections. See the blog post for more details.

Avoid potentially unsafe roads: When ticked, this option tells the routing engine to try its hardest to avoid using 'primary', 'secondary' or 'tertiary' highways unless they explicitly have a sidewalk or are marked with foot=yes. Again, it does not completely prevent use of such roads, it just makes them very unlikely to be used. See the answer immediately below for more details on safety.

Avoid unlit streets: This option tells the routing engine to try to avoid using streets that are not tagged in Openstreetmap as being lit. As with other options, it does not prevent the use of streets without lighting, it just makes it the routing algorithm prefer streets are lit. Enabling this option will also cause an overlay to be shown that displays where streets are lit (this works best in conjunction with the dark map layer). See the blog post for more details.

The route being suggested includes a road that is unsafe for runners, why?

Trail Router should never send you down a road that is illegal to be on. If it does, please let me know.

However, just because a road is legal to walk on, it doesn't mean it's safe to do so. Trail Router uses OpenStreetMap as its data source for routing information. Openstreetmap supports the concept of tags that can be applied to roads to indicate their suitability for pedestrians. For example, a 'sidewalk' tag can be added to indicate the presence or lack of a sidewalk/pavement. However, in many parts of the world, tagging data is very incomplete. This can lead to the routing algorithm picking roads that may be unsafe. This problem appears to be particularly acute in North America, perhaps because of a historical car-centric culture, or perhaps just because that's where most Trail Router users are!

The good news is that you have a few options. You can try using the "Avoid potentially unsafe roads" option. This tells the routing engine to try avoid using any major roads (primary, secondary and tertiary highways in Openstreetmap) unless they explicitly have a sidewalk.

You can also help improve the quality of Openstreetmap data, and thus the route suggestions from Trail Router. You can submit a correction via Trail Router directly: just click on the help menu button, then click "Report an issue". Alternatively, you can download the StreetComplete Android app to make corrections directly by yourself. If you're making your own corrections in OpenSreetMap, then the following will be useful to you. Trail Router will never use a primary, secondary or tertiary road that has a "sidewalk=no" tag. We suggest using this tag on clearly unsafe roads.

Please note that any corrections to OpenStreetMap may take a few weeks to show up in Trail Router, as we only periodically refresh our source data.

How do I run with one of the generated routes?

There's two main ways to use one of the routes generated by Trail Router.

  1. If you already have a GPS watch or a running app (e.g. Strava, RunKeeper, etc), then you can export a GPX file from Trail Router and import it into your watch or running app. To export a GPX file, click on the share icon on the menu, and click 'Export GPX'.
  2. You can also run with Trail Router directly. In the Android and iOS app, just click the "Run" button once you've created your route. This will use turn-by-turn navigation by default. If you'd prefer a simpler mode of navigation that just follows you around the map and locks the screen, then go to the settings screen and switch off "Turn-by-turn navigation".

For more details on these options, please read the dedicated blog post on navigating with a Trail Router route.

I've discovered a strange route, how do I report an error?

Please get in touch, and include a link to the faulty route and a description of what's wrong with it. Every report is reviewed and replied to.

I have an idea for a cool new feature, can you add it?

Maybe! Please get in touch.

Are the routes suitable for cycling?

Maybe, but please do not rely on it - at least not for road bikes. We use the tags associated with roads and paths (called "ways" in Openstreetmap terminology) to determine whether it is accessible by foot. We include hiking trails as being accessible by foot, and these will often be unsuitable for bikes. There are a different set of tags that indicate a way's suitability for cycling, and we are not yet using those. If there is demand, then perhaps we will introduce a cycling mode in the future.

How does Trail Router work?

Please see the blog post How Trail Router works.

What do you track and log?

Please see our privacy policy.

Is there an Android/iOS app?

Yes, there is both an Android and iOS app. Visit the app download page for more information.

What's new with Trail Router?

You can check out the release notes to find out.

Can I donate money to help support Trail Router?

Keeping Trail Router online costs around 200 USD per month. We do not have any advertising or paid plans, so that's entirely self-funded at present.

The vast majority of this cost goes on hosting two large servers (256GB RAM, and 2TB of SSD storage), which is required to keep all of the mapping data in memory to ensure routing calculations are fast. The world is a pretty big place, so this consumes a lot of memory!

If you'd like to help support Trail Router, you can donate on a monthly basis via our Patreon page.


Trail Router would not be possible without the following open source projects:

We would like to thank Mapbox for their support-in-kind via their community programme. This provides Trail Router with free mapping credits. This enables us to continue to grow without the fear of large bills. Read more about Mapbox's support of Trail Router in this blog post.

A big thank you is also owed to Achim Wagenknecht, and Felix Görner who contributed German translations for and the Android app respectively.