The one-line rule
Send a shapefile to a GIS department, GeoJSON to a developer, and KML to anyone who will open it in Google Earth. If you only remember one thing, remember that — the rest of this page is why.
Side by side
| Format | Best for | Strengths | Limits |
|---|---|---|---|
| Shapefile (.shp) | Government, survey and cadastral data; anything you exchange with QGIS or ArcGIS | Universally accepted, fast, keeps a typed attribute table | Multiple files, column names capped at 10 characters, no true curves, 2 GB limit |
| GeoJSON (.geojson) | Web maps, APIs, anything a developer touches | One plain-text file, readable in any editor, native to every web mapping library | Large and slow for big datasets, always WGS84 degrees, no styling |
| KML / KMZ (.kml) | Google Earth, sharing with people who are not GIS users | Carries colours, icons, labels and pop-up descriptions with the data | Weak attribute handling, awkward for analysis, KMZ must be unzipped by some tools |
Where each one usually bites you
The failures are predictable once you know them.
- Shapefile: field names silently truncated to 10 characters, so "population_2024" becomes "populatio". Rename columns before exporting.
- Shapefile: forgetting the .prj, which puts the data in the wrong part of the world when it is not already in degrees.
- GeoJSON: file size. A detailed polygon layer can be five times bigger than the equivalent shapefile, and slow to draw.
- KML: attributes get flattened into an HTML description bubble, so analysis tools cannot read them cleanly.
- All three: mixing geometry types in one file. Keep points, lines and polygons in separate layers.
Converting without losing anything
Conversion is safe as long as you check the attribute table afterwards. Free converters here: KML to GeoJSON, GeoJSON to KML, GeoJSON to CSV and CSV to GeoJSON. To start from a shapefile, open it in the shapefile viewer first. Every one of them runs in your browser, so the data stays on your machine.
What about GeoPackage?
GeoPackage (.gpkg) is the modern replacement for the shapefile: a single file, no 10-character column limit, multiple layers inside one container, and no 2 GB ceiling. If both sides of the exchange use recent QGIS or ArcGIS, prefer it. The reason shapefiles persist anyway is inertia — every system on earth already reads them.
Frequently asked questions
Which format is smallest?▾
For the same data, shapefile is usually smallest, GeoJSON largest, and KML in between. Zipping narrows the gap considerably because GeoJSON is plain text and compresses well.
Can GeoJSON store a coordinate system other than WGS84?▾
In practice, no. The current specification fixes GeoJSON to longitude and latitude in WGS84, so reproject before exporting.
What is the difference between KML and KMZ?▾
KMZ is simply a zipped KML, sometimes bundled with icons and images. Unzip it if a tool refuses to read it.
Will converting lose my attributes?▾
Shapefile to GeoJSON keeps them intact. Going into KML pushes attributes into a description bubble, and going into CSV drops the geometry unless you keep a coordinate column.
Convert between formats free
Get started in seconds. Free tier, no credit card required.
Convert a file now