More games at WuGames.ioSponsoredDiscover free browser games — play instantly, no download, no sign-up.Play

WKT GeoJSON Converter - Convert WKT to GeoJSON Online

Free WKT GeoJSON converter: convert between Well-Known Text (WKT) and GeoJSON formats online. Validate, edit and visualize geometric data instantly.

What is WKT and GeoJSON?

WKT (Well-Known Text) is a text markup language for representing vector geometry objects. It's a standard format used in GIS software, databases (like PostGIS), and spatial data exchange.

GeoJSON is a JSON-based format for encoding geographic data structures. It's widely used in web mapping applications and provides a more verbose but human-readable representation of geometries.

Key differences:

  • Format: WKT is compact text, GeoJSON is JSON-based
  • Usage: WKT for databases/GIS, GeoJSON for web applications
  • Structure: WKT is simpler, GeoJSON includes properties and metadata
  • Support: WKT in spatial databases, GeoJSON in JavaScript libraries

WKT Format Examples

WKT represents geometries as text strings:

  • POINT: POINT(30 10)
  • LINESTRING: LINESTRING(30 10, 10 30, 40 40)
  • POLYGON: POLYGON((30 10, 40 40, 20 40, 10 20, 30 10))
  • MULTIPOINT: MULTIPOINT((10 40), (40 30), (20 20))
  • MULTILINESTRING: MULTILINESTRING((10 10, 20 20), (15 15, 30 15))

WKT is widely supported in spatial databases like PostGIS, MySQL Spatial, and Oracle Spatial.

GeoJSON Format Examples

GeoJSON represents geometries as JSON objects:

{
  "type": "Point",
  "coordinates": [30, 10]
}

GeoJSON can include feature properties and is the preferred format for web mapping libraries like Leaflet, Mapbox GL, and OpenLayers.

Common Use Cases

Convert between WKT and GeoJSON for:

  • Database Import/Export: Transfer spatial data between PostGIS and web apps
  • Web Mapping: Convert WKT from databases to GeoJSON for visualization
  • Data Migration: Move data between different GIS systems
  • API Integration: Transform geometry formats for different services
  • Validation: Check geometry validity in both formats

Supported Geometry Types

This converter supports all standard geometry types:

  • Point, MultiPoint
  • LineString, MultiLineString
  • Polygon, MultiPolygon
  • GeometryCollection

Both 2D and 3D coordinates are supported. The converter automatically handles coordinate transformations and validates geometry structure.

Frequently Asked Questions

WKT (Well-Known Text) is a text-based geometry format defined by OGC Simple Features. A geometry like POINT(-122.4194 37.7749) or POLYGON((0 0, 0 1, 1 1, 1 0, 0 0)) is concise and human-readable, which makes WKT popular in SQL databases (PostGIS, SQL Server, Oracle Spatial), data exchange between desktop GIS, and as a copy-paste format. GeoJSON is JSON-native and the de-facto standard for web maps. Converting between them lets you query in PostGIS, export the result as WKT, and visualise it in a Leaflet or Mapbox map without writing a custom parser. The conversion is lossless for all standard geometry types.

All standard OGC types: POINT, LINESTRING, POLYGON, MULTIPOINT, MULTILINESTRING, MULTIPOLYGON, and GEOMETRYCOLLECTION. The tool also accepts the extended OGC types CIRCULARSTRING, COMPOUNDCURVE, CURVEPOLYGON, MULTICURVE, and MULTISURFACE, although these are tessellated into LineStrings and Polygons during conversion to GeoJSON because GeoJSON has no native curve types. Z (elevation) and M (measure) coordinates are preserved as the third and fourth array elements per RFC 7946 (which permits altitude as the third element but does not formally define measure; the tool stores M as a property).

GeoJSON requires WGS84 longitude-latitude (EPSG:4326) per RFC 7946. WKT does not embed CRS information in the text itself; that is stored externally (in PostGIS's geometry_columns table or as a separate srid value). When converting from WKT to GeoJSON, you should be confident that the source WKT is already in WGS84, otherwise reproject first using ST_Transform in PostGIS or ogr2ogr. The tool will not auto-detect a projected CRS from coordinate magnitudes; large numbers (UTM-style) will be flagged as suspicious but not rejected, so be careful with values outside the latitude-longitude range.

Yes. EWKT prefixes the geometry with SRID=xxxx; followed by the standard WKT. The converter recognises this prefix and strips the SRID. If the SRID is 4326 (or omitted), the geometry is parsed straight to GeoJSON. If the SRID is something else (a national projection or Web Mercator EPSG:3857), the tool refuses to convert and asks you to reproject upstream because converting between datums in the browser requires a heavy library (proj4js with EPSG bundles) that the lightweight tool does not include by default. You can also choose to ignore the SRID and accept the coordinates as-is, which is appropriate only if you know they are already WGS84.

Yes. You can paste either WKT or GeoJSON and it will detect the format and offer the conversion in the opposite direction. GeoJSON to WKT is useful for inserting geometries into PostgreSQL/PostGIS using ST_GeomFromText() or for sharing geometries with desktop GIS tools that accept WKT (QGIS's Field Calculator, ArcGIS Pro's Calculate Geometry). When converting a GeoJSON FeatureCollection to WKT, you can choose to output a list of WKT strings (one per feature) or a single GEOMETRYCOLLECTION containing them all. Properties are dropped because WKT has no concept of attached attributes.

WKT typically stores coordinates as decimal numbers with up to 15 significant digits, which matches the precision of IEEE 754 double-precision floats used in JavaScript. The conversion preserves the full precision both ways. However, if you copy a WKT geometry from PostgreSQL, the database may have rounded coordinates to a fixed precision (often 7 decimal places, about 1 cm at the equator) before storage. Downstream rounding by JSON serialisation in JavaScript can also remove trailing zeros, although the numeric value is preserved. For audit-grade exact preservation, check both source and target tooling rounding configurations.

Polygon is a single closed shape with one outer ring and zero or more inner rings (holes). MultiPolygon is a list of independent Polygons that should be treated as a single feature, such as a country composed of islands. WKT distinguishes them with the keywords POLYGON((...)) and MULTIPOLYGON(((...)),((...))). The converter preserves this distinction in GeoJSON output. Some renderers will display a Polygon and a MultiPolygon identically, but spatial operations behave differently: ST_Area on a MultiPolygon sums all parts; ST_Intersects with a hole-containing Polygon correctly excludes the hole, while a naive Multi-of-Polygons may not.

Yes, after the first visit. The converter is pure client-side JavaScript with no network dependency; once the page is in your browser cache, it works offline indefinitely. There are no cookies or analytics installed on the geometry data, no uploads happen during conversion, and you can verify this by watching the browser's network tab while you paste and convert. This matters when working with confidential geometries such as proprietary survey results, internal facility layouts, or location data subject to GDPR or other privacy regulations. Closing the tab discards everything from memory.
WKT GeoJSON Converter - Convert WKT to GeoJSON Online — Free WKT GeoJSON converter: convert between Well-Known Text (WKT) and GeoJSON formats online. Validate, edit and visuali
WKT GeoJSON Converter - Convert WKT to GeoJSON Online