Converting to WKT...
Paste or upload a GeoJSON file and click Convert to WKT to see the results.
How the Conversion Works
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 Type | WKT Keyword | Example |
|---|---|---|
| Point | POINT | POINT (2.3522 48.8566) |
| MultiPoint | MULTIPOINT | MULTIPOINT ((0 0),(1 1)) |
| LineString | LINESTRING | LINESTRING (0 0, 5 5, 10 0) |
| MultiLineString | MULTILINESTRING | MULTILINESTRING ((0 0,1 1),(2 2,3 3)) |
| Polygon | POLYGON | POLYGON ((0 0,10 0,10 10,0 10,0 0)) |
| MultiPolygon | MULTIPOLYGON | MULTIPOLYGON (((0 0,4 0,4 4,0 4,0 0))) |
| GeometryCollection | GEOMETRYCOLLECTION | GEOMETRYCOLLECTION (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:
| Format | Encoding | Human-readable | Best for |
|---|---|---|---|
| WKT | ASCII text | Yes | Hand-crafted SQL, debugging, small datasets |
| WKB | Binary / hex | No | Bulk 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?
Can I convert a single GeoJSON geometry rather than a FeatureCollection?
Can I convert GeoJSON to WKT without installing GDAL?
Does WKT support Z (elevation) coordinates?
How do I load WKT into Python Shapely?
What is the difference between WKT and GeoJSON?
Related Calculators
WKT to GeoJSON Converter
The reverse direction — parse WKT and output RFC 7946 GeoJSON
GeoJSON to CSV Extractor
Flatten GeoJSON feature properties into a downloadable CSV table
GeoJSON Validator
Validate, format, and minify GeoJSON — check ring closure and schema
UTM Zone Finder
Find the UTM zone, EPSG code, and Proj4 string for any coordinate
EPSG to PROJ4 / WKT Converter
Enter any EPSG code and get PROJ4 string, WKT1, and WKT2 definitions