New: Screen RecorderScreen + webcam, trim, save as MP4Try it now →

Add tools here by clicking the star icon.
Back to tools

GeoJSON to WKT Converter (and WKT to GeoJSON)

Paste or open GeoJSON and copy it as WKT for your SQL database — or paste WKT to turn it into GeoJSON. The geometry is drawn on the map so you can check it first.

Loading map editor…

GeoJSON vs WKT

WKT (Well-Known Text) is the OGC text format for geometry used by spatial databases. It stores only the geometry — no properties — with coordinates separated by spaces:

  • Point {"type":"Point","coordinates":[-0.1281,51.508]} → POINT (-0.1281 51.508)
  • LineString → LINESTRING (x y, x y, …)
  • Polygon with a hole → POLYGON ((outer…), (hole…))
  • MultiPolygon → MULTIPOLYGON (((…)), ((…)))
  • GeometryCollection → GEOMETRYCOLLECTION (POINT (…), …)

Both use longitude first (x y). One feature converts to one WKT geometry; several features are combined into a GEOMETRYCOLLECTION. To get WKT for a single feature, select it and press Copy WKT in the panel.

WKT to GeoJSON

Paste WKT into Import (one geometry, or one per line). SRID=4326; prefixes (EWKT), Z coordinates and EMPTY geometries are understood. Then export GeoJSON.

Using WKT in SQL

  • PostGIS: ST_GeomFromText('POLYGON ((…))', 4326)
  • SQL Server: geography::STGeomFromText('POLYGON ((…))', 4326)
  • MySQL: ST_GeomFromText('POLYGON ((…))', 4326)
  • BigQuery: ST_GEOGFROMTEXT('POLYGON ((…))')

How to use it

  1. Open a GeoJSON file, paste GeoJSON or WKT with Import, or draw shapes.
  2. Check the geometry on the map.
  3. Press “Copy WKT” (all features) or select one feature and copy its WKT from the panel. For GeoJSON, use Export.

Common Use Cases

  • Inserting shapes into PostGIS or SQL Server
  • Spatial filters in BigQuery
  • Debugging WKT from a database on a map
  • Converting WKT from a spreadsheet into GeoJSON

Frequently Asked Questions

Are properties included in WKT?
No — WKT describes geometry only. Keep GeoJSON (or Shapefile/KML) if you need the attributes.
Does SQL Server need a different ring order?
SQL Server’s geography type expects counterclockwise outer rings — the RFC 7946 order this tool uses for drawn shapes. Use Fix winding order in the GeoJSON tab for imported data.
Can I convert many WKT rows at once?
Yes. Paste one WKT geometry per line into Import; each line becomes a separate feature.

Why use this tool?

  • Both directions: GeoJSON → WKT and WKT → GeoJSON
  • EWKT and 3D coordinates understood
  • Visual check on a map
  • Adjustable coordinate precision

Privacy

Your shapes and files stay in your browser — nothing is uploaded. Map tiles come from OpenStreetMap or Esri, and place searches go to OpenStreetMap Nominatim.

How was this tool?

Your feedback helps us make it better.

Have further opinions? Email me at hello@everythingbagel.app