Skip to main content

GeoJSON to WKT Converter

Convert geometry between GeoJSON and WKT (Well-Known Text) in either direction — Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon and GeometryCollection. Auto-detects the input format, with options for coordinate precision, pretty-printed JSON and uppercase WKT keywords. Runs entirely in your browser.

Input

Accepts a raw GeoJSON geometry, Feature or FeatureCollection, or a WKT string. Both formats order coordinates as longitude latitude (X Y).

Options

Decimal places to round to. Trailing zeros are trimmed.

Output

Converted geometry
Was this helpful?

Guides

Convert spatial geometry between GeoJSON and WKT (Well-Known Text) in either direction, right in your browser. Paste a GeoJSON object or a WKT string, and the converter detects the format and produces the other one — no upload, no account, and your data never leaves the page.

What it does

GeoJSON and WKT are the two formats you meet most often when moving geometry between tools. GeoJSON is the JSON-based standard used by web maps, Leaflet, Mapbox and countless APIs. WKT is the compact, human-readable text format used by PostGIS, spatial SQL and desktop GIS software. This tool translates freely between them so you can copy geometry from a database query into a web map, or the other way around, without hand-editing brackets.

Supported geometry types: Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon and GeometryCollection. GeoJSON input can be a raw geometry, a Feature, or a FeatureCollection (multiple features collapse into a GeometryCollection).

How to use it

  1. Paste your geometry into the input box.
  2. Leave Direction on Auto-detect, or force a direction if your input is ambiguous.
  3. Optionally set a coordinate precision to round long decimals, toggle pretty-printed GeoJSON, or choose lowercase WKT keywords.
  4. Copy or download the converted result.

WKT formatting rules

WKT nests parentheses by geometry complexity, and getting the nesting right is the single most common source of errors:

  • POINT (30 10) — one coordinate.
  • LINESTRING (30 10, 10 30, 40 40) — a flat, comma-separated list.
  • POLYGON ((30 10, 40 40, 20 40, 10 20, 30 10)) — an extra pair of parentheses wraps each ring; a polygon has one exterior ring plus optional holes.
  • MULTIPOLYGON (((...)), ((...))) — one more level again, one group per polygon.

The converter handles all of these automatically, so you never count brackets by hand.

Coordinate order

Both GeoJSON and WKT in the EPSG:4326 reference system order coordinates as longitude latitude (X then Y). A frequent mistake — especially in AI-generated data — is swapping them to latitude longitude when the source is labelled "lat/lon". This tool preserves whatever order your input uses, so double-check the source before you trust it.

Rings must be closed

A valid polygon ring repeats its first coordinate as its last, closing the loop. If a ring in your GeoJSON isn't closed, most rendering software will still draw it, but strict validators will reject it — keep the first and last points identical.

Privacy

The conversion runs entirely client-side in JavaScript. Nothing you paste is transmitted to a server, which makes the tool safe for proprietary or sensitive geographic data.

Is WKT the same as WKB?

No. WKT is the text form; WKB (Well-Known Binary) is its binary equivalent, used for compact storage in databases. This tool works with WKT text.

geojsonwktwell-known-textgisgeometryspatialconvertercoordinates

Love the tools? Lose the ads.

One payment clears every ad from your account, for good. No subscription, no tracking.