WKT to GeoJSON Converter & Map Viewer
GIS & Geography ToolsOnline WKT playground to convert WKT to GeoJSON (and back) and view on an interactive map. Supports PostGIS, SQL Server, and other GIS data.
Enter WKT or GeoJSON to convert between formats and view the result on an interactive map. Supports FeatureCollection to GEOMETRYCOLLECTION conversion.
WKT & GeoJSON Guide
Format Comparison
WKT and GeoJSON are the two most common formats for representing geospatial data. Understanding their differences helps you choose the right format for your workflow.
| Feature | WKT | GeoJSON |
|---|---|---|
| Format type | Plain text | JSON |
| Primary use | Databases (PostGIS, SQL Server) | Web APIs & frontends |
| Geometry types | POINT, LINESTRING, POLYGON, ... | Point, LineString, Polygon, ... |
| Attribute data | Not supported | Stored in "properties" |
| Standard | OGC / ISO 19162 | RFC 7946 |
WKT Examples
Here are common WKT geometry types you can paste into the converter above.
Point
A single coordinate point (Tokyo Station)
POINT(139.7671 35.6812)LineString
A line connecting two or more points
LINESTRING(139.7671 35.6812, 139.6917 35.6895, 139.7454 35.6586)Polygon
A closed area (first and last coordinates must match)
POLYGON((139.74 35.67, 139.78 35.67, 139.78 35.70, 139.74 35.70, 139.74 35.67))MultiPoint
Multiple separate points (Tokyo and Osaka)
MULTIPOINT((139.7671 35.6812), (135.5023 34.6937))Tips
- Polygon coordinates must form a closed ring — the first and last points must be identical.
- GeoJSON coordinates use [longitude, latitude] order, same as WKT.
- In PostGIS, use ST_AsText() for WKT and ST_AsGeoJSON() for GeoJSON conversion.
- Use FeatureCollection to group multiple geometries with their properties into a single GeoJSON document.
Glossary
- WKT (Well-Known Text)
- WKT stands for Well-Known Text, which is a text representation of spatial data used in Geographic Information Systems (GIS). WKT is a standard format for describing geometric objects like points, lines, polygons, and multi-polygons in a way that is both human-readable and machine-readable. WKT is often used to exchange spatial data between different GIS systems or to store geometry information in databases.
- GeoJSON
- GeoJSON (Geographic JavaScript Object Notation) is a lightweight data interchange format for representing geographic spatial data. Based on the JSON format, GeoJSON is well-suited for expressing geographical shapes on a map. It combines the human-readable and machine-parseable features of JSON and is defined by RFC 7946.
- PostGIS
- PostGIS is an open-source spatial database extension for PostgreSQL. It adds support for geographic objects, allowing location queries to be run in SQL. PostGIS supports both WKT and GeoJSON formats and is one of the most widely used GIS databases.
- OGC (Open Geospatial Consortium)
- The Open Geospatial Consortium is an international organization that develops open standards for geospatial data. WKT, WKB, and many other spatial data formats and protocols are defined as OGC standards.
- FeatureCollection
- A FeatureCollection is a GeoJSON object type that contains an array of Feature objects. Each Feature has a geometry (Point, Polygon, etc.) and a properties object for attribute data. FeatureCollections are the standard way to represent multiple geographic features in a single GeoJSON document.
FAQ
- Q: Should I use WKT or GeoJSON?
- A: Use WKT for database storage and SQL queries (PostGIS, SQL Server). Use GeoJSON for web APIs, frontend map rendering, and data exchange between web services. Many tools support both, so the choice depends on your primary workflow.
- Q: What is the coordinate order?
- A: Both WKT and GeoJSON use longitude first, then latitude (e.g., POINT(139.7 35.6) or [139.7, 35.6]). This differs from Google Maps and many GPS devices which display latitude first.
- Q: Can 3D coordinates be handled?
- A: Yes. WKT supports POINT Z(139.7 35.6 100) for 3D coordinates. GeoJSON includes the altitude as the third element in the coordinates array: [139.7, 35.6, 100]. Note that altitude support varies across tools.