Polyline API
Encode and decode Google/Mapbox encoded polylines — the compact ASCII string used by the Google Maps Directions API, Mapbox, Valhalla, OSRM and GPX-style route geometry to pack a list of coordinates into a few bytes. Decode an encoded string into an array of latitude/longitude points, encode a coordinate list back into a polyline (precision 5, the Google default, or 6 for OSRM/Valhalla overview), and measure a path — point count, total length by the haversine great-circle formula in km and miles, and the bounding box. Perfect for drawing routes on a map, storing tracks compactly, computing trip distance and fitting a map viewport. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 4 endpoints. Distinct from coordinate-format conversion (Plus Code/MGRS/UTM) and geohash.
api.oanor.com/polyline-api