Overview
Discover what makes GraphHopper powerful
GraphHopper is a high‑performance, memory‑efficient routing engine written in Java and released under the Apache 2.0 license. At its core it ingests OpenStreetMap (OSM) and GTFS data, builds a compact graph representation of the road network, and exposes both a Java API and an HTTP‑based web service for on‑the‑fly route calculation. The engine supports a wide range of routing profiles (car, bike, pedestrian, truck, scooter, etc.) and can be extended with custom profile definitions to model vehicle dimensions, access restrictions or user‑defined road preferences. Beyond classic A‑to‑B routing it offers advanced analysis features such as isochrones, map matching (snap‑to‑road), and mobile navigation support.
Fast Routing
Profile Customization
Isochrones & Analysis
Map Matching
Overview
GraphHopper is a high‑performance, memory‑efficient routing engine written in Java and released under the Apache 2.0 license. At its core it ingests OpenStreetMap (OSM) and GTFS data, builds a compact graph representation of the road network, and exposes both a Java API and an HTTP‑based web service for on‑the‑fly route calculation. The engine supports a wide range of routing profiles (car, bike, pedestrian, truck, scooter, etc.) and can be extended with custom profile definitions to model vehicle dimensions, access restrictions or user‑defined road preferences. Beyond classic A‑to‑B routing it offers advanced analysis features such as isochrones, map matching (snap‑to‑road), and mobile navigation support.
Architecture
GraphHopper’s architecture is modular and highly configurable. The core library (graphhopper-core) implements the graph data structures, routing algorithms (Dijkstra, A*, Contraction Hierarchies), and profile handling. The web layer (graphhopper-web) bundles a lightweight Jetty server, REST endpoints, and the optional Maps UI. Data import is performed by a dedicated importer that parses OSM XML/PBF files into the internal graph format; it can also consume GTFS feeds for public transit routing. The engine relies on Java 17+, uses SLF4J for logging, and stores the pre‑processed graph in a custom binary format on disk. No external database is required for routing, though optional Redis or PostgreSQL backends can be plugged in for caching or spatial queries.
Core Capabilities
- Fast Routing – Contraction Hierarchies reduce query times to milliseconds even for continent‑wide graphs.
- Profile Customization – Define speed, turn costs, and accessibility rules per vehicle type via XML or programmatic API.
- Isochrones & Analysis – Compute reachable areas within a time budget, useful for service‑area planning.
- Map Matching – Align noisy GPS traces to the underlying road network with configurable tolerance.
- Mobile Navigation – Generate turn‑by‑turn instructions and distance tables for offline use in Android/iOS apps.
- REST API – Exposes endpoints for route, profile, and analysis requests; supports JSON responses with detailed turn instructions, geometry, and metadata.
Deployment & Infrastructure
GraphHopper is self‑hostable on any JVM‑compatible environment. A single JAR (graphhopper-web-<ver>.jar) can be run with a minimal heap (e.g., 4 GB) for small regions; larger deployments benefit from multiple instances behind a load balancer. Docker images are provided, enabling rapid scaling in Kubernetes or cloud‑native stacks. The engine’s low memory footprint (≈ 2–4 GB for a continental graph) makes it suitable for edge devices or embedded systems. For high‑traffic scenarios, developers can shard the graph by region or employ a caching layer (Redis) to mitigate repeated query costs.
Integration & Extensibility
GraphHopper exposes a clean Java API, allowing developers to embed routing directly into microservices or batch processing pipelines. The REST layer accepts custom query parameters, enabling integration with third‑party mapping libraries or GIS tools. Plugin hooks exist for extending the import pipeline (e.g., adding custom tags from proprietary data sources) and for injecting bespoke post‑processing logic on routes. Webhooks are not native, but developers can wrap the REST endpoints in their own event‑driven services. The community maintains a rich set of sample profiles and plugins, and the open source nature ensures that any proprietary enhancement can be merged back into the core.
Developer Experience
The project follows semantic versioning, and its documentation is organized in a dedicated docs/ directory with clear API references, profile examples, and migration guides. The community forum (discuss.graphhopper.com) and a StackOverflow tag provide rapid support, while the GitHub issue tracker is actively maintained. Configuration is driven by a simple config.yaml file, making it straightforward to toggle features such as caching, logging levels, or custom profile directories. The permissive Apache 2.0 license removes licensing friction for commercial deployments, and the lack of a proprietary server component gives developers full control over scaling and cost.
Use Cases
- Fleet Management – Compute optimized routes for delivery trucks, integrating traffic data and vehicle constraints.
- Ride‑Sharing & Logistics – Provide real‑time turn‑by‑turn navigation and dynamic rerouting for drivers.
- Urban Planning – Generate isochrone maps to analyze service coverage or evaluate new transit lines.
- Mobile Navigation Apps – Embed offline routing into Android/iOS apps for areas with limited connectivity.
- Custom Mapping Services – Build niche routing solutions (e.g., cargo bike, wheelchair‑friendly routes) that require bespoke profile logic.
Advantages
GraphHopper’s combination of speed, low memory usage, and open‑source licensing makes it a compelling choice over commercial routing platforms. Its Java foundation ensures portability across JVM hosts, while the modular architecture allows developers to drop in only the components they need. The ability to import custom data sources and define fine‑grained routing profiles gives unparalleled flexibility, especially for specialized industries such as logistics or accessibility services. Finally, the active community and comprehensive documentation reduce onboarding time, enabling developers to focus on building value‑added features rather than wrestling with the routing stack.
Open SourceReady to get started?
Join the community and start self-hosting GraphHopper today
Related Apps in other
Immich
Self‑hosted photo and video manager
Syncthing
Peer‑to‑peer file sync, no central server
Strapi
Open-source headless CMS for modern developers
reveal.js
Create stunning web‑based presentations with HTML, CSS and JavaScript
Stirling-PDF
Local web PDF editor with split, merge, convert and more
MinIO
Fast, S3-compatible object storage for AI and analytics
Weekly Views
Repository Health
Information
Explore More Apps
Friendica
Decentralized social network for federated communication
Serendipity
Reliable, extensible PHP blog engine for self‑hosted sites

b1gMail
Self-hosted PHP email platform with calendar, tasks and cloud drive
Otter Wiki
Minimalist Markdown Wiki Powered by Git
Cyrus IMAP
Secure, scalable mail server with multi‑protocol support
Nginx Proxy Manager
Simple reverse proxy with free SSL for home networks
