# GIS file converter

> Convert any map file to the format you need: KML, KMZ, shapefile, GPX, GeoJSON or CSV. Pick the output, drop the file, check it on the map. Free, and no account needed.

Open the tool: https://spatibase.com/tools/gis-file-converter/

The Spatibase GIS file converter converts KML, KMZ, ESRI shapefile, GPX, GeoJSON, CSV and Excel files into any of KML, KMZ, shapefile, GPX, GeoJSON and CSV, in your web browser. It’s free with no account, it opens files up to 50 MB, and your file is never uploaded.

What it does with your file:

- **Finds the format itself.** It reads the first bytes, so a `.zip` with a shapefile, a KMZ renamed to `.zip` or GeoJSON saved as `.json` all open. Pick the source format only to narrow the file picker.
- **Shows it before you download.** Every place, line and area goes on a map with a list, so you can check the file before you send it on.
- **Says what the target can’t hold.** Notes under the map list shortened shapefile fields, dropped styles, split layers and anything left out.
- **Standard coordinates.** Everything comes out in WGS 84 longitude and latitude; a shapefile in another projection is reprojected from its `.prj`.

## What it does
- Converts between KML, KMZ, ESRI shapefile, GPX, GeoJSON and CSV, every direction
- Reads Excel (.xlsx) and TSV as well as CSV
- Detects the file format from its contents, not just the extension
- Reprojects shapefiles to WGS 84 from their .prj file
- Shows the result on a map and in a list before you download
- Notes every field rename, split layer and dropped style
- Runs in the browser: nothing is uploaded

## How to convert a GIS file
1. Pick the format you need under Convert to, for example Shapefile for a GIS team or KML for Google Earth. Leave From on Detect automatically.
2. Drop your file on the box, or press Choose a file. For a shapefile, drop the `.zip`, or pick the `.shp`, `.dbf`, `.prj` and `.cpg` together.
3. Look over the map and the notes under it: they say what the new format keeps and what it leaves out.
4. Press the download button for your format. Changed your mind? Pick another format under Convert to: the open file converts again, no need to drop it twice.

## Every conversion
Rows are the file you have, columns the format you need. Pairs with a page of their own link to it; the rest open this converter with the pair picked.

| From \ To | KML | KMZ | Shapefile (.zip) | GPX | GeoJSON | CSV |
|---|---|---|---|---|---|---|
| KML |  | [Page](https://spatibase.com/tools/kml-to-kmz/) | [Page](https://spatibase.com/tools/kml-to-shapefile/) | [Page](https://spatibase.com/tools/kml-to-gpx/) | [Page](https://spatibase.com/tools/kml-to-geojson/) | [Page](https://spatibase.com/tools/kml-to-csv/) |
| KMZ | [Page](https://spatibase.com/tools/kmz-to-kml/) |  | [Page](https://spatibase.com/tools/kmz-to-shapefile/) | [Page](https://spatibase.com/tools/kmz-to-gpx/) | [Convert](https://spatibase.com/tools/gis-file-converter/?from=kmz&to=geojson) | [Convert](https://spatibase.com/tools/gis-file-converter/?from=kmz&to=csv) |
| Shapefile (.zip or .shp) | [Page](https://spatibase.com/tools/shapefile-to-kml/) | [Convert](https://spatibase.com/tools/gis-file-converter/?from=shapefile&to=kmz) |  | [Convert](https://spatibase.com/tools/gis-file-converter/?from=shapefile&to=gpx) | [Page](https://spatibase.com/tools/shapefile-to-geojson/) | [Convert](https://spatibase.com/tools/gis-file-converter/?from=shapefile&to=csv) |
| GPX | [Page](https://spatibase.com/tools/gpx-to-kml/) | [Page](https://spatibase.com/tools/gpx-to-kmz/) | [Convert](https://spatibase.com/tools/gis-file-converter/?from=gpx&to=shapefile) |  | [Page](https://spatibase.com/tools/gpx-to-geojson/) | [Page](https://spatibase.com/tools/gpx-to-csv/) |
| GeoJSON | [Page](https://spatibase.com/tools/geojson-to-kml/) | [Convert](https://spatibase.com/tools/gis-file-converter/?from=geojson&to=kmz) | [Page](https://spatibase.com/tools/geojson-to-shapefile/) | [Convert](https://spatibase.com/tools/gis-file-converter/?from=geojson&to=gpx) |  | [Page](https://spatibase.com/tools/geojson-to-csv/) |
| CSV or Excel | [Page](https://spatibase.com/tools/csv-to-kml/) | [Convert](https://spatibase.com/tools/gis-file-converter/?from=csv&to=kmz) | [Convert](https://spatibase.com/tools/gis-file-converter/?from=csv&to=shapefile) | [Convert](https://spatibase.com/tools/gis-file-converter/?from=csv&to=gpx) | [Convert](https://spatibase.com/tools/gis-file-converter/?from=csv&to=geojson) |  |

## Which format to convert to
Pick the format the next app or person expects. Each one keeps something different:

| Format | Opens in | Keeps | Leaves out |
|---|---|---|---|
| KML | Google Earth, Google My Maps, most GIS apps | Names, descriptions, folders, fields as ExtendedData, styles from a KML source | Nothing a map viewer needs; large files get slow in Google Earth |
| KMZ | Google Earth, Google My Maps | The same as KML, zipped (often 5 to 10 times smaller) | Photos and icons from the original KMZ are not carried over |
| Shapefile | QGIS, ArcGIS, permit and planning portals | Shapes and attributes, in WGS 84 with a `.prj` and UTF-8 `.cpg` | Styles; field names cut to 10 characters; text over 254 bytes; one kind of shape per layer, so a mix becomes up to three layers |
| GPX | GPS devices, Garmin, Strava, Komoot, OsmAnd | Points as waypoints, lines as tracks, names, descriptions, elevation | Areas (written as their outline tracks) and most custom fields |
| GeoJSON | Web maps (MapLibre, Leaflet, Mapbox), code, Spatibase | Everything: all fields with their types, every kind of shape | Styles; nothing else |
| CSV | Excel, Google Sheets, databases | One row per feature: every field, latitude and longitude for points, the shape as WKT text for lines and areas | Nothing, but lines and areas are text, so a spreadsheet can’t draw them |

## Formats and limits
- **Opens:** KML, KMZ, shapefile (.zip, or .shp with .dbf, .prj and .cpg), GPX, GeoJSON (.geojson, .json), CSV, TSV, TXT and Excel (.xlsx), up to 50 MB.
- **Downloads:** KML, KMZ, shapefile (.zip), GPX, GeoJSON or CSV; GeoJSON and CSV are always offered too.
- **Link to a pair:** https://spatibase.com/tools/gis-file-converter/?from=kml&to=shapefile (from: kml, kmz, shapefile, gpx, geojson, csv or auto; to: the same without auto).
- **Privacy:** the file is read in your browser and never uploaded.
- Try it with a sample: https://spatibase.com/tools/gis-file-converter/?sample=1

## Convert any GIS file with ogr2ogr
GDAL’s ogr2ogr, which comes with QGIS, converts between these formats and many more on the command line. The output format goes after `-f`, the new file first, the source last:

```bash
ogr2ogr -f GeoJSON places.geojson places.kml          # KML → GeoJSON
ogr2ogr -f KML places.kml places.shp                   # shapefile → KML
ogr2ogr -f GPX places.gpx places.geojson -dsco GPX_USE_EXTENSIONS=YES
ogr2ogr -f "ESRI Shapefile" out/ places.geojson -lco ENCODING=UTF-8
ogr2ogr -f CSV places.csv places.gpx tracks -lco GEOMETRY=AS_WKT
ogr2ogr -f LIBKML places.kmz places.geojson            # KMZ needs the LIBKML driver
```

**Run `ogr2ogr --formats`** to see which formats your GDAL build reads and writes; LIBKML (for KMZ) is in most builds that come with QGIS.

**GPX and shapefiles have layers.** A GPX has `waypoints`, `routes` and `tracks`; name the one you want after the source. A shapefile takes one kind of shape, so add `-where "OGR_GEOMETRY='POINT'"` per kind for mixed data.

## Frequently asked questions
### What is a GIS file converter?
A tool that rewrites map data from one file format into another, such as KML to shapefile or GPX to GeoJSON. The places, lines and areas stay the same; what changes is how they are stored and which apps can open them. This one runs in your browser and handles KML, KMZ, shapefile, GPX, GeoJSON and CSV.

### Which map file formats can I convert here?
It reads KML, KMZ, ESRI shapefiles (zipped or as loose .shp, .dbf, .prj and .cpg files), GPX, GeoJSON, CSV, TSV and Excel .xlsx. It writes KML, KMZ, shapefile (.zip), GPX, GeoJSON and CSV, in any direction, 30 pairs in all.

### How do I know which format my file is?
You don’t need to: leave From on Detect automatically and drop the file. The converter reads its contents and says what it found in the notes, even when the extension is wrong, such as a KMZ saved as .zip.

### Will I lose anything when I convert between formats?
Sometimes, and the notes under the map say what. Shapefiles cut field names to 10 characters and hold one kind of shape per layer, GPX has no areas, KML and GeoJSON drop each other’s styling, and CSV stores lines and areas as WKT text. The shapes and their coordinates are always kept.

### Can I convert several files at once?
One file at a time, except a shapefile, whose .shp, .dbf, .prj and .cpg parts are picked together. To merge files, convert each to GeoJSON and import them into one Spatibase project, or use ogr2ogr with -append.

### Is it safe to convert confidential map data here?
Yes. The file is read and converted by your own browser and never sent to Spatibase or anyone else; you can even disconnect after the page loads. Only the background map tiles come from the internet.

## Next step
Turn the file into a live map your team can edit: **Save to Spatibase (free)** on the page saves it to a free Spatibase project (https://app.spatibase.com/signup), your places on a map you can edit and a live GeoJSON address for your site. Or download the GeoJSON and import it by hand (https://spatibase.com/docs/content/import/).
