WKT vs GeoJSON — What's the Difference?

WKT (Well-Known Text) is a geometry text representation for SQL and PostGIS, GeoJSON is for web applications and APIs. WKT is more compact, GeoJSON is easier for development.

Criteria WKT GeoJSON
SQL/PostGIS✓✗
Web applications✗✓
Attributes✗✓
Compactness✓✗
Human-readable✓✓

When to use WKT

For SQL queries, PostGIS, geometry debugging, pasting into QGIS.

When to use GeoJSON

For web development, APIs, Leaflet/Mapbox, storage with attributes.

Export to WKT Export to GeoJSON