Decode a polyline and view it on a map
Paste an encoded polyline to check it visually. Green marks the start, red the end.
How to check a polyline
- Paste a Google encoded polyline, such as one from the Google Maps Directions API, Mapbox, OSRM or Valhalla.
- Pick the precision it was encoded with: 5 for Google, 6 for OSRM or Valhalla.
- Click Show on map. You'll see the route, its start and end coordinates, and any problems found.
Questions
Why is my polyline in the middle of the ocean?
Usually latitude and longitude were swapped when it was encoded, so each point was written as [longitude, latitude]. This is easy to do because KML and GeoJSON store coordinates longitude first. The decoder spots this and offers a one-click fix, with a corrected polyline to copy.
Why is my polyline in the wrong place or the wrong size?
It was probably encoded with a different precision. Google Maps uses precision 5; OSRM and Valhalla use precision 6. Decoding with the wrong one shrinks or stretches the route by a factor of ten.
Is the polyline stored?
No. It's decoded to draw the map and isn't saved.
Need to make a polyline? Convert a KML or KMZ file.