OSRM review: the free, open-source C++ routing engine for OpenStreetMap data. Features, performance, licensing, and top routing engine alternatives.
OSRM (Open Source Routing Machine) is a free, open-source routing engine written in C++ that computes shortest paths and turn-by-turn directions using OpenStreetMap data. It was first released in July 2010 by Dennis Luxen at the Karlsruhe Institute of Technology and is licensed under the permissive 2-clause BSD license.
It is not a commercial product or company; it is a community-maintained open-source project hosted on GitHub, historically supported in part by Mapbox's Directions team before Mapbox shifted its primary routing investment to the Valhalla engine in 2018.
OSRM's defining characteristic is raw routing performance: it uses contraction hierarchies and related preprocessing techniques to return shortest-path results on continent-sized road networks within milliseconds, enabling real-time navigation and routing use cases.
It supports multiple built-in travel profiles for driving, cycling, and walking, and those profiles can be customized via Lua scripts to model different vehicle restrictions, road preferences, or custom routing logic for specialized applications.
OSRM is completely free and open source under the 2-clause BSD license, with no licensing fees, usage limits, or paid tiers imposed by the project itself.
Because there is no official hosted API, organizations either self-host OSRM on their own infrastructure, incurring only server costs, or use a third-party service built on top of OSRM, whose pricing is set by that provider rather than by the OSRM project.
Yes, OSRM is open source under the permissive 2-clause BSD license, with no licensing fees for using, modifying, or embedding it in other products.
OSRM was created by Dennis Luxen and first released in July 2010 as part of his work at the Karlsruhe Institute of Technology in Germany.
Not officially. The core project provides the routing engine software; organizations typically self-host it or use a third-party service built on top of it.
Mapbox used OSRM to power its navigation products for years but shifted its primary routing investment to the Valhalla engine starting in early 2018.
OSRM supports driving, cycling, and walking routing profiles out of the box, and these can be customized via Lua scripts for specialized use cases.
OSRM uses contraction hierarchies and similar preprocessing to answer shortest-path queries on continent-sized networks within milliseconds, making it suitable for real-time routing.
OSRM routes using OpenStreetMap data extracts, which are community-maintained and freely available for most regions of the world.