Google Encoded Polyline Decoder
Decode a Google encoded-polyline string into [latitude, longitude] coordinate pairs at the given decimal precision.
Description
Decode an encoded-polyline string into ordered latitude and longitude coordinate pairs.
Google Encoded Polyline Decoder decode an encoded-polyline string into ordered latitude and longitude coordinate pairs.
Use this to inspect route geometry returned by mapping systems, convert compact paths into tables, or feed decoded coordinates into geometry tools.
When to use Google Encoded Polyline Decoder
Use this to inspect route geometry returned by mapping systems, convert compact paths into tables, or feed decoded coordinates into geometry tools.
How it works
The decoder reads variable-length signed coordinate deltas, accumulates latitude and longitude, and divides by 10 raised to the selected precision.1
Interpreting the result
Keep the input units, direction conventions, encoding, and ordering rules visible when reusing the result. Preserve the full returned value for downstream calculations and round only for presentation.
Assumptions and limitations
Encoded polylines are lossy at their chosen precision. A wrong precision rescales every coordinate, and decoding does not establish coordinate reference systems beyond latitude/longitude degrees.
References
-
Encoded Polyline Algorithm Format — Google Maps Platform