2D WKT and GeoJSON converter
Convert strict two-dimensional WKT and GeoJSON geometries while preserving coordinate order, polygon holes and explicit Feature metadata sidecars.
- 1Add input
- 2Adjust settings
- 3Get your result
Tool input and files are processed in this browser without being uploaded.
Before you start
Exchange a planar geometry without dropping its holes or Feature properties. Check the complete geometry syntax, preserve its numeric coordinates and download both geometry and metadata when needed.
How to use this tool
- Choose WKT → GeoJSON or GeoJSON → WKT and open one local geometry.
- Inspect geometry type, position count, ring closure and coordinates. If converting a Feature, retain its metadata sidecar.
- Download geometry and sidecar. To restore a Feature, convert WKT with that metadata JSON in the secondary input.
Supported inputs and limits
One UTF-8 WKT/GeoJSON file or pasted source plus optional Feature sidecar, combined up to 1 MiB. At most 100,000 positions, 10,000 geometries and geometry nesting depth 20. Selected file takes precedence. Preview shows the first 200 coordinate positions; downloads contain the complete geometry. JSON parsing also has a 200,000-node and depth-128 budget.
Supports nonempty 2D Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon and GeometryCollection. WKT is consumed completely, with decimal/exponent number syntax; suffix garbage, SRID/EWKT, Z/M dimensions, EMPTY and nonfinite numbers reject. Positions use finite IEEE-754 doubles; unsafe integers and negative zero reject. No arbitrary-precision decimal preservation or rounding setting.
Lines need at least two positions; rings need at least four and equal first/last positions. Coordinate/ring/hole order is retained; orientation and self-intersection are not repaired or validated. No coordinate-system guessing, geographic-axis interpretation or reprojection. Geometry objects must contain type and coordinates/geometries only; foreign geometry members, null geometry and FeatureCollection reject.
GeoJSON Features preserve properties/id/other Feature-level members in a downloadable feature-metadata.json sidecar, which excludes geometry. Supply that sidecar with WKT to restore the Feature. Metadata is never silently discarded. A selected conversion generates both .geojson and .wkt; original text spacing/number spelling is canonicalized. Spreadsheet protection changes CSV coordinate-report cells only. Feature metadata number tokens are retained losslessly, including integers beyond the coordinate-safe range.
Worked example
Example input
POLYGON ((0 0, 4 0, 4 4, 0 4, 0 0), (1 1, 1 2, 2 2, 2 1, 1 1))
Example options
{"secondary": "", "params": {"direction": "wkt-to-geojson"}}Example output
{
"type": "Polygon",
"coordinates": [
[
[
0,
0
],
[
4,
0
],
[
4,
4
],
[
0,
4
],
[
0,
0
]
],
[
[
1,
1
],
[
1,
2
],
[
2,
2
],
[
2,
1
],
[
1,
1
]
]
]
}When something does not work
Remove trailing garbage and provide exactly two finite coordinates per position. Close polygon rings and supply complete nonempty components. Keep Feature metadata beside WKT; remove unsupported geometry-level foreign fields only after deciding how to preserve them elsewhere.
Frequently asked questions
Will Feature properties survive WKT conversion?
Yes. They are saved in an explicit metadata sidecar; WKT itself has no properties field.
Does it correct polygon orientation or invalid topology?
No. It checks dimensional shape and closed rings but retains the supplied order and does not repair topology.
Can it reproject or preserve a third coordinate?
No. This contract is nonempty two-dimensional geometry conversion without CRS interpretation.