How to Convert WKT to GeoJSON (Online, Free)

Well-Known Text (WKT) and GeoJSON are two of the most common ways to represent geometry, but they serve different worlds: WKT is the native text format of spatial databases like PostGIS, while GeoJSON is the lingua franca of web maps and JavaScript. Converting between them is a daily task for GIS developers.

The quickest way is to paste your geometry into the free WKT ⇄ GeoJSON converter — no signup, no install. If you just want to see the shape on a map first, the WKT viewer renders it instantly.

What actually changes between WKT and GeoJSON

The geometry is the same; the encoding differs. A WKT polygon looks like this:

POLYGON ((-77.03 -12.04, -77.02 -12.04, -77.02 -12.03, -77.03 -12.03, -77.03 -12.04))

The equivalent GeoJSON geometry:

{
  "type": "Polygon",
  "coordinates": [[
    [-77.03, -12.04], [-77.02, -12.04],
    [-77.02, -12.03], [-77.03, -12.03], [-77.03, -12.04]
  ]]
}
Coordinate order gotcha: Both WKT and GeoJSON use longitude, latitude order (X, Y). If your points land in the wrong hemisphere, you probably swapped them somewhere upstream.

Doing it from PostGIS

If your geometry lives in a PostGIS table, you can export either format directly with SQL:

-- WKT
SELECT ST_AsText(geom) FROM parcels WHERE id = 42;

-- GeoJSON
SELECT ST_AsGeoJSON(geom) FROM parcels WHERE id = 42;

Copy the result of ST_AsText and paste it into the converter to get GeoJSON, or vice-versa. For bulk workflows, every WKT Studio project also exposes a REST API so you can push and pull GeoJSON features programmatically — see the API docs.

Summary

WKT is compact and database-native; GeoJSON is web-native and nests cleanly into JSON. To convert, paste into the converter, or use ST_AsGeoJSON / ST_GeomFromText in PostGIS. Watch the longitude/latitude order and you are done.