WKT to GeoJSON Converter
The typical bridge between a SQL query result and a web map — PostGIS ST_AsText() in, GeoJSON out.
Common issues converting WKT to GeoJSON
- Plain WKT has no CRS tag — we assume WGS 84 in the output. EWKT with an SRID prefix is reprojected if the SRID is supported.
- 3D (Z) coordinates are preserved in GeoJSON's three-element tuples. M (measured) values are dropped — GeoJSON per RFC 7946 has no M support.
- One WKT geometry per line in the input file; the output is a FeatureCollection with one feature per parsed geometry.
- Invalid WKT strings (unclosed parens, typos) cause the whole parse to fail with a location hint. Re-export from your database if the format is questionable.
Frequently asked questions
Is EWKT (PostGIS-style with SRID) supported?
Yes. An EWKT prefix like 'SRID=4326;POINT(...)' is parsed. If the SRID is a CRS we can reproject client-side, the output is in WGS 84; otherwise the input is assumed already WGS 84.
Which WKT geometry types are supported?
All OGC Simple Features types: POINT, LINESTRING, POLYGON, their MULTI* variants, and GEOMETRYCOLLECTION.
What happens to 3D Z or measured M values?
Z is preserved — GeoJSON coordinates become three-element tuples. M is dropped since RFC 7946 doesn't define it.
Can I paste a WKT string directly rather than upload a file?
Save as a .wkt or .txt file with one geometry per line and upload. We don't run a clipboard parser on this page.