WKT Geometry Validator & GeoJSON Converter
Well-Known Text (WKT) Format Reference
WKT is the ISO/OGC standard text representation for geometric objects. Used in PostGIS (ST_GeomFromText), QGIS, Shapely (Python), JTS (Java), and most GIS databases.
| WKT Type | Example |
|---|---|
| POINT | POINT(139.6917 35.6895) |
| LINESTRING | LINESTRING(0 0, 1 1, 2 1) |
| POLYGON | POLYGON((0 0, 4 0, 4 4, 0 4, 0 0)) |
| MULTIPOLYGON | MULTIPOLYGON(((0 0, 1 0, 1 1, 0 0))) |
WKT Geometry Validator & GeoJSON Converter
Paste WKT geometry. The tool validates syntax, extracts coordinates, computes the centroid, and generates equivalent GeoJSON output.
Using WKT in PostGIS Queries
PostGIS accepts WKT through the ST_GeomFromText() function. Here is a typical spatial query:
SELECT name, ST_Distance(
geom,
ST_GeomFromText('POINT(139.6917 35.6895)', 4326)
) AS distance_m
FROM locations
ORDER BY distance_m
LIMIT 10;
The second argument 4326 is the SRID (Spatial Reference ID), which tells PostGIS that the WKT coordinates use the WGS84 geographic coordinate system.