Encoded Polyline Converter
Convert between Google's encoded polyline format and GeoJSON/WKT.
How to use
- Polyline → GeoJSON: paste a Google-encoded polyline string to decode it.
- GeoJSON → Polyline: paste a LineString to encode it, choosing precision 5 (Google default) or 6 (OSRM/Valhalla).
Map Preview
Loading map…
Bidirectional Encoded Polyline Conversion
Convert between Google encoded polylines and GeoJSON LineStrings. Choose precision 5 or precision 6 as used by OSRM and Valhalla.
Frequently asked questions
Why does my decoded route look totally wrong?
Almost always a precision mismatch — OSRM and Valhalla use precision 6, not Google's default of 5. Matching the source's precision usually fixes it.
How was correctness verified?
Matched byte-for-byte against Google's own published encoded-polyline-algorithm example.