What Is WKT (Well-Known Text)? Format Explained with Examples

Well-Known Text (WKT) is a text markup language for representing vector geometry, standardized by the Open Geospatial Consortium (OGC). It is what you get when you run ST_AsText() in PostGIS or call .wkt on a Shapely geometry. Its appeal is simplicity: a geometry is just a type keyword followed by coordinates.

Want to see any of the examples below on a map? Paste them into the free WKT viewer.

The seven geometry types

POINT (-77.03 -12.04)

LINESTRING (-77.03 -12.04, -77.02 -12.03, -77.01 -12.05)

POLYGON ((-77.03 -12.04, -77.02 -12.04,
          -77.02 -12.03, -77.03 -12.03, -77.03 -12.04))

MULTIPOINT ((-77.03 -12.04), (-77.02 -12.03))

MULTILINESTRING ((-77.03 -12.04, -77.02 -12.03),
                 (-77.01 -12.05, -77.00 -12.06))

MULTIPOLYGON (((-77.03 -12.04, -77.02 -12.04, -77.02 -12.03, -77.03 -12.04)))

GEOMETRYCOLLECTION (POINT (-77.03 -12.04),
                    LINESTRING (-77.02 -12.03, -77.01 -12.05))
Rings must close:a POLYGON's outer ring has to start and end at the same coordinate. The extra pair at the end is not a typo — it closes the loop.

Where you will run into WKT

WKT shows up all over the GIS stack: PostGIS (ST_AsText, ST_GeomFromText), Shapely, GeoPandas, GDAL/OGR, and many CSV exports that store a geometry column as WKT. Because it is plain text, it copies and pastes cleanly between tools — which is exactly why a browser-based viewer is so handy for a quick sanity check.

WKT vs GeoJSON

If you need the same geometry as GeoJSON for a web map, see our guide on converting WKT to GeoJSON, or paste it straight into the converter.