GeoJSON to WKT Converter

Paste or upload any GeoJSON file and convert every geometry to Well-Known Text — ready for PostGIS ST_GeomFromText(), SpatiaLite, or Shapely. No GDAL, no installs.

All GeoJSON Types SRID=4326 Prefix PostGIS Ready No GDAL Required Pure Go
Share this tool

GeoJSON Input

— or upload —

characters

Output Options

Enable for PostGIS ST_GeomFromEWKT() — outputs SRID=4326;POINT (…) instead of plain WKT.

Quick Load:

Converting to WKT...

Paste or upload a GeoJSON file and click Convert to WKT to see the results.

How the Conversion Works

GeoJSON FeatureCollection {"type":"Feature" "geometry":{…}} Convert orb/geojson parse wkt.Marshal(geom) all geometry types WKT Output PostGIS / SQLite POLYGON ((30 10, 40 40, 20 40, ...))

Each GeoJSON feature becomes one WKT string. Features with null geometry produce GEOMETRYCOLLECTION EMPTY.

What Is WKT (Well-Known Text)?

Well-Known Text (WKT) is an OGC standard for representing vector geometry as a human-readable ASCII string. Every geometry type has a keyword followed by coordinate tuples in parentheses:

POINT (2.3522 48.8566) LINESTRING (0 0, 5 5, 10 0) POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0)) MULTIPOLYGON (((0 0, 4 0, 4 4, 0 4, 0 0)), ((5 5, 9 5, 9 9, 5 9, 5 5)))

Coordinate order in WKT follows the same convention as GeoJSON: longitude first, latitude second. PostGIS with SRID=4326 interprets POINT (lon lat) correctly.

WKT is supported by every major spatial database and GIS library: PostGIS, SpatiaLite, Oracle Spatial, SQL Server Spatial, Shapely (Python), GEOS (C/C++), and JTS (Java). It is human-readable enough to copy-paste into a SQL query and debug by eye.

When Do You Need GeoJSON to WKT?

GeoJSON is the de-facto web format — it is what APIs return, what Mapbox and Leaflet consume, and what QGIS exports by default. But spatial databases and many Python libraries expect WKT:

  • PostGIS INSERT statements — INSERT INTO locations (geom) VALUES (ST_GeomFromText('POINT (2.35 48.86)', 4326));
  • SpatiaLite / SQLite — GeomFromText('POLYGON (...)', 4326)
  • Python Shapely — from shapely import wkt; poly = wkt.loads('POLYGON ((...))')
  • Spatial SQL queries — ST_Intersects(geom, ST_GeomFromText(...))

The GDAL CLI equivalent is ogr2ogr -f "CSV" output.csv input.geojson -lco GEOMETRY=AS_WKT. This tool replaces that command with a paste-and-download workflow that requires no local installation.

How GeoJSON Geometry Types Map to WKT

All seven GeoJSON geometry types are supported. The table below shows the WKT keyword and an example output for each type.

GeoJSON TypeWKT KeywordExample
PointPOINTPOINT (2.3522 48.8566)
MultiPointMULTIPOINTMULTIPOINT ((0 0),(1 1))
LineStringLINESTRINGLINESTRING (0 0, 5 5, 10 0)
MultiLineStringMULTILINESTRINGMULTILINESTRING ((0 0,1 1),(2 2,3 3))
PolygonPOLYGONPOLYGON ((0 0,10 0,10 10,0 10,0 0))
MultiPolygonMULTIPOLYGONMULTIPOLYGON (((0 0,4 0,4 4,0 4,0 0)))
GeometryCollectionGEOMETRYCOLLECTIONGEOMETRYCOLLECTION (POINT (0 0),LINESTRING (0 0,1 1))

Coordinate order note: GeoJSON and WKT both use longitude first, latitude second. PostGIS interprets POINT (lon lat) correctly when the geometry column carries SRID=4326.

What Is Extended WKT (EWKT) and When Should You Use It?

Extended WKT (EWKT) is a PostGIS extension to the ISO WKT standard that prepends a spatial reference identifier to the geometry string:

SRID=4326;POINT (2.3522 48.8566) SRID=4326;POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))

PostGIS's ST_GeomFromEWKT() function reads both the geometry and the SRID in one call, so you do not need to pass a second argument:

-- With plain WKT (two arguments needed): SELECT ST_GeomFromText('POINT (2.35 48.85)', 4326); -- With EWKT (SRID embedded): SELECT ST_GeomFromEWKT('SRID=4326;POINT (2.35 48.85)');

When to use the SRID prefix: enable it when you are writing raw SQL INSERT statements into PostGIS. Leave it off when feeding WKT to Shapely, SpatiaLite, or any tool that does not understand the SRID= prefix — those tools will reject it as malformed.

WKT vs WKB — Which Should You Use?

WKT (Well-Known Text) and WKB (Well-Known Binary) are both OGC standards for geometry representation, but they serve different purposes:

FormatEncodingHuman-readableBest for
WKTASCII textYesHand-crafted SQL, debugging, small datasets
WKBBinary / hexNoBulk ETL pipelines, large datasets, OGR drivers

For inserting a handful of features from a GeoJSON export, WKT is the right choice — it is transparent, easy to validate, and works directly in a SQL client. Switch to WKB (hex-encoded via ST_AsBinary / ST_AsEWKB) when processing millions of rows in an ETL pipeline, where the compact binary encoding saves parse time and storage bandwidth.

Frequently Asked Questions

How do I use WKT in a PostGIS INSERT statement?

Use ST_GeomFromText() with the WKT string and SRID as a second argument: INSERT INTO locations (name, geom) VALUES ('Paris', ST_GeomFromText('POINT (2.3522 48.8566)', 4326)); Alternatively, enable the SRID=4326 prefix on this tool and use ST_GeomFromEWKT() with no second argument.

Can I convert a single GeoJSON geometry rather than a FeatureCollection?

Yes. The tool accepts three input forms: a FeatureCollection (array of features), a single Feature object (with 'type':'Feature'), or a bare Geometry object such as {"type":"Point","coordinates":[2.35,48.85]}. All three produce one WKT row in the output.

Can I convert GeoJSON to WKT without installing GDAL?

That is exactly what this tool does. Paste or upload a GeoJSON file and click Convert — no GDAL, no ogr2ogr, no Python environment needed. The conversion runs on the server using the pure Go orb library.

Does WKT support Z (elevation) coordinates?

Yes — WKT supports 3D coordinates via the Z suffix: POINT Z (lon lat elev). However, GeoJSON also uses three-element coordinate arrays [lon, lat, elev] for 3D geometries, and the orb library carries those elevation values through to the WKT output automatically.

How do I load WKT into Python Shapely?

Use shapely.wkt.loads(): from shapely import wkt; geom = wkt.loads('POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))') — do NOT enable the SRID=4326 prefix if you are using Shapely, as it expects plain WKT without the SRID header.

What is the difference between WKT and GeoJSON?

GeoJSON is a JSON-based format designed for web APIs and browser-side mapping libraries. WKT is an older text format designed for spatial databases and desktop GIS tools. GeoJSON encodes geometry as nested JSON arrays; WKT uses a compact parenthetical notation. Both represent the same geometry — this tool converts one to the other.