GeoJSON to WKT Converter
Convert GeoJSON to Well-Known Text for PostGIS, Oracle Spatial or SQL Server. Control coordinate precision and merge features into a GEOMETRYCOLLECTION.
What is the GeoJSON to WKT Converter?
This converter turns GeoJSON — a Feature, a FeatureCollection or a bare geometry — into Well-Known Text you can paste straight into a spatial SQL query.
- Handles Feature, FeatureCollection and bare geometry input
- All seven geometry types including GeometryCollection
- Coordinate rounding from 4 to 8 decimal places, or full precision
- Optional feature-name prefix and single-GEOMETRYCOLLECTION output
- Null-geometry features skipped instead of breaking the output
- 100% client-side — nothing is uploaded
How to use the GeoJSON to WKT Converter
- 1
Paste your GeoJSON into the box, or drop a .geojson file onto the upload area.
- 2
Choose a coordinate precision and decide whether to keep altitude values.
- 3
Click Convert to WKT — you get one geometry per line.
- 4
Copy the WKT or download it as a .wkt text file.
About the GeoJSON to WKT Converter
This converter turns GeoJSON — a Feature, a FeatureCollection or a bare geometry — into Well-Known Text you can paste straight into a spatial SQL query. Each feature becomes one WKT string on its own line, ready for ST_GeomFromText, a QGIS text layer or an OGC service request.
You can round coordinates to a chosen number of decimals to keep queries readable, keep or drop altitude values, prefix each line with the feature's name property, and optionally merge everything into a single GEOMETRYCOLLECTION. Features with a null geometry are skipped rather than producing broken output.
It is aimed at developers loading web-map data into PostGIS, analysts moving geometry between tools, and anyone who has a GeoJSON file but a database that only speaks WKT. Conversion is entirely client-side — your geometry is never uploaded.
Frequently asked questions
How do you convert GeoJSON to WKT?
Map each GeoJSON type to its WKT keyword and write the positions as space-separated pairs inside nested parentheses. Paste your GeoJSON above and the converter emits one ready-to-use WKT string per feature.
How do I insert WKT into PostGIS?
Wrap it in ST_GeomFromText with the SRID, for example ST_GeomFromText('POINT(-74.006 40.7128)', 4326). Since GeoJSON is always WGS-84 longitude/latitude, 4326 is the SRID you want in nearly every case.
Do GeoJSON properties survive the conversion?
No — WKT describes geometry only and has no place to store attributes. This tool can prefix each line with the feature's name so you can match rows up, but any other properties need to travel in separate columns.
How many decimal places should I keep?
Six decimals locate a point to about 11 centimetres, which is more than enough for almost all data and keeps queries far more readable. Trim to five (about 1.1 m) for web-map display data, or keep full precision when round-tripping survey-grade geometry.
What happens to a feature with a null geometry?
It is skipped. GeoJSON explicitly allows a Feature to carry properties with no geometry, but WKT has no way to express that, so emitting anything would produce invalid text.
Is my GeoJSON sent to a server?
No. Parsing and serialisation run entirely in your browser, so confidential boundaries and client data never leave your device. The converter also works offline.
Related tools
WKT to GeoJSON Converter
Convert WKT geometry to GeoJSON in your browser. Supports all seven geometry types, Z and M dimensions, EMPTY geometries and EWKT SRID prefixes.
GeoJSON Validator
Validate GeoJSON against RFC 7946 and get the exact JSON path of every problem: unclosed rings, swapped coordinates, missing properties and more.
GeoJSON to KML Converter
Convert GeoJSON or JSON to KML for Google Earth, free in your browser. Points, lines, polygons, multi-geometries and feature properties supported. No upload.
Bounding Box Calculator
Calculate the bounding box of a list of coordinates or a GeoJSON file. Get the bbox array, Leaflet bounds, WKT envelope and a downloadable polygon.
JSON Formatter
Format, beautify and minify JSON online with 2-space, 4-space or tab indentation. Sort keys alphabetically and catch syntax errors instantly — free and private.