ClearSKY FaviconClearSKY Polygon Tools

Polygon Formats. WKT vs WKB vs GeoJSON vs Shapefile vs KML and KMZ

2026-01-08 · 7 min read · WKT · WKB · GeoJSON · Shapefile · KML · KMZ · conversion · validation · GIS

Choose the right polygon format for your workflow. Learn what WKT, WKB, GeoJSON, Shapefile, KML, and KMZ are best at, what breaks pipelines, and how to convert safely in the browser.

Try it now

If you work with polygons, you will constantly run into the same question.
Which format should I use for storage, for sharing, and for GIS tools.

This guide explains the practical differences between:

It also shows safe conversion habits using ClearSKY Polygon Tools.


Quick pick. Which format should you use

Use this if you just want the answer.

If you are not sure, start with GeoJSON and keep WKT around for debugging.


What each format is good at

WKT. Best for copy paste, databases, and debugging

WKT is a text representation of geometry, like POLYGON((...)).

When WKT shines, you can paste one geometry into WKT Validator and immediately see what is wrong.

WKB. Best for compact storage and transport

WKB is a binary representation of geometry. You will often see it as hex text or base64 in logs and APIs.

When WKB shines, you decode it in WKB Viewer, validate the geometry, then export WKT or GeoJSON.

GeoJSON. Best for web, APIs, and modern tooling

GeoJSON is JSON. It supports geometry plus properties and FeatureCollections.

When GeoJSON shines, you can validate and preview it quickly, then convert it to the format you need.

Shapefile. Best for legacy compatibility

Shapefile is old, but it is still everywhere. It is not one file. It is a set of files.

When Shapefile shines, it is because someone upstream only accepts it.

KML and KMZ. Best for Google Earth sharing and visual review

KML is XML and KMZ is a zipped KML bundle. KML is usually used for display and sharing.

KMZ is often better than KML because it is one file, and it can include related assets.


What breaks conversions in real life

Most conversion failures are not about the format. They are about the geometry.

Common failure modes.

If you validate first, conversions become boring.


A safe conversion workflow in ClearSKY Polygon Tools

This is the workflow that avoids surprises.

  1. Validate first.
  2. Fix geometry issues in the Editor if needed.
  3. Convert to the target format.
  4. Validate again after conversion, if the target system is strict.

Step 1. Validate

If you see errors, do not convert yet. Fix first.

Step 2. Fix in the Editor

The Editor is for decisions that no validator should guess for you, like:

Step 3. Convert

Use Universal Converter when you just want a reliable conversion path between formats.

Step 4. Confirm the output


Format tips that save you time


FAQ

Which format should I pick as a 'source of truth'?

In most modern workflows, GeoJSON is a good default source of truth. It keeps properties with geometry, it is readable, and it is easy to validate. If your system is database first, WKB and EWKB are common for geometry storage, and WKT is a practical option for readability.

Why does Shapefile cause so many surprises?

It is a legacy format with limits, and it is not one file. Missing sidecar files, attribute constraints, and CRS handling cause most of the pain. Shapefile is still useful, but you should expect friction.

Is KML always EPSG 4326?

KML is generally interpreted as WGS84 lon, lat in most viewers. If you feed projected coordinates, it will usually look wrong. If you are unsure, validate and preview before sharing.

Is WKT better than GeoJSON for performance?

For a single geometry, WKT can be smaller and simpler. For structured datasets with properties, GeoJSON is usually easier to work with and safer to exchange. For very large datasets, you will eventually want proper tiling or compression regardless of format.

Should a validator fix my geometry automatically?

A validator should detect and explain issues. Light, deterministic fixes can be offered as options, but real repairs often require human intent. If a fix changes topology, it belongs in an editor step where you can see the result.

Related resources

Related guides