WKT ↔ GeoJSON Converter
Convert Well-Known-Text geometry to GeoJSON and back. Supports Point, LineString, Polygon, all Multi-variants and GeometryCollection, with Z coordinates preserved. Free, runs entirely in your browser.
Try these examples (click to load):
POINT (-73.985 40.758)
LINESTRING (…)
POLYGON ((…))
MULTIPOINT ((…))
WKT vs GeoJSON at a glance
| Geometry | WKT | GeoJSON |
|---|---|---|
| Point | POINT (x y) | {"type":"Point","coordinates":[x,y]} |
| Line | LINESTRING (x y, x y) | {"type":"LineString","coordinates":[[x,y],...]} |
| Polygon | POLYGON ((x y, ...)) | {"type":"Polygon","coordinates":[[[x,y],...]]} |
Both formats follow the OGC / RFC 7946 axis convention: (longitude, latitude), matching the GeoJSON spec. Coordinates are stored as JSON numbers, so no precision is lost in conversion.
Frequently Asked Questions
What is WKT and how is it different from GeoJSON?
WKT (Well-Known Text) is the compact, human-readable geometry format defined by the OGC and used by PostGIS, MySQL, SpatiaLite and SQL Server — e.g. POINT (-73.985 40.758). GeoJSON is the JSON-based format used by web maps, MongoDB, Mapbox and most JS libraries. They describe the same geometry in different syntaxes.
Why would I convert WKT to GeoJSON?
When you pull geometry out of a SQL database it comes back as WKT; to render it on a Leaflet or Mapbox map, or pass it to Turf.js, you need GeoJSON. Going the other way, GeoJSON from an API often needs to become WKT for a SQL INSERT.
Does the converter handle Multi-geometry and geometry collections?
Yes — POINT, LINESTRING, POLYGON, MULTIPOINT, MULTILINESTRING, MULTIPOLYGON and GEOMETRYCOLLECTION all round-trip in both directions. Z coordinates are preserved when present.
Are coordinates in (lng, lat) or (lat, lng) order?
Both WKT and GeoJSON use (x, y) = (longitude, latitude) order, per the OGC and RFC 7946 specs. The converter preserves that order exactly — it does not swap axes.