KML to Shapefile converter
Turn a KML or KMZ from Google Earth or Google My Maps into a zipped shapefile (SHP) for QGIS and ArcGIS. Free, and no account needed.
Convert KML to Shapefile online, in your browser
KML or KMZ in, SHP out. The Spatibase KML to Shapefile converter turns a Google Earth or Google My Maps file into an ESRI shapefile in your web browser. The details:
- One .zip. A
.shp,.shx,.dbf,.prjand.cpgper kind of shape (points, lines, areas), in WGS 84 (EPSG:4326) with UTF-8 text. - What survives: names, plain-text descriptions, folders and ExtendedData fields, as attribute columns with names of up to 10 characters. Styles, icons and altitude are dropped.
- Nothing is uploaded. Files up to 50 MB, no account.
How to convert KML to a shapefile
- Save your map as KML or KMZ. Google My Maps: the three-dot menu next to the map title → Export to KML/KMZ. Google Earth Pro: right-click the folder in Places → Save Place As.
- Drop the file on the box above, or press Choose a file. A KMZ is unzipped for you.
- Check the map and the notes under it: they list every shortened field name and anything left out.
- Press Download shapefile (.zip). A map with pins, paths and areas gives three layers in one zip, such as
trip_points,trip_linesandtrip_areas. - Unzip it next to your project. In QGIS, drag the
.shpfiles onto the map. In ArcGIS Pro, use Map → Add Data and pick the.shpfiles.
What happens to your KML in a shapefile
| What | What happens |
|---|---|
| Points, lines and areas | Kept, in up to three layers: _points, _lines and _areas. One shapefile can only hold one kind of shape. |
| Names | Kept in a name column. |
| Descriptions | Kept in a descriptio column, as plain text. Bold, links and other HTML formatting are removed. |
| ExtendedData fields | Kept, one column each. KML stores these values as text, so the columns are text columns; change a type later in QGIS or ArcGIS if you need numbers. |
| Folders | Kept in a folder column. Nested folders read like Trips / 2024. |
| Field names | Cut to 10 plain characters and kept unique, for example opening_hours → opening_ho. Accents are dropped (é → e), and spaces and letters such as ß become _. The notes list each rename. |
| Long text | Cut at 254 bytes, the most a shapefile text field holds (fewer letters for accented or non-Latin text). The notes say how many values were cut. |
| Styles, colours and icons | Dropped. A shapefile stores no styling; set it again in QGIS or ArcGIS. |
| Altitude and times | Dropped. The shapefile keeps longitude and latitude only, and a Google Earth track’s timestamps have no column. |
| Image overlays and network links | Left out, with a count in the notes. |
Why the zip has several layers and 10-letter field names
One shape type per shapefile. A KML folder can mix pins, paths and areas. A shapefile can’t: each .shp holds points, lines or areas, never a mix. So a mixed map becomes up to three layers, named after your file.
Each layer is a set of five files. They only work together, so keep them in one folder with the same name:
- .shp the shapes themselves
- .shx an index that lets apps find each shape
- .dbf the attribute table (names, descriptions, your fields)
- .prj the coordinate system, here WGS 84
- .cpg the text encoding, here UTF-8
Field names stop at 10 characters. The attribute table is a dBASE file, a 1980s format with 10 characters per column name. description becomes descriptio, and a clash gets a number, such as descript_1. Need longer names or text? Download GeoJSON from this page too: it has neither limit.
Convert KML to shapefile with ogr2ogr
GDAL’s ogr2ogr, which comes with QGIS, converts on the command line. The plain command stops at the first shape of another kind (“Attempt to write non-point geometry to point shapefile”), so run it once per kind of shape:
# each KML folder becomes its own shapefile inside points/, lines/ and areas/
ogr2ogr -f "ESRI Shapefile" points/ places.kml -where "OGR_GEOMETRY='POINT'" -lco ENCODING=UTF-8
ogr2ogr -f "ESRI Shapefile" lines/ places.kml -where "OGR_GEOMETRY='LINESTRING'" -lco ENCODING=UTF-8
ogr2ogr -f "ESRI Shapefile" areas/ places.kml -where "OGR_GEOMETRY='POLYGON'" -lco ENCODING=UTF-8Keep -lco ENCODING=UTF-8. Without it, GDAL writes the attribute table in ISO-8859-1, and letters outside it (ř, ł, 東) are lost.
In Python, geopandas goes through GDAL too: gpd.read_file("places.kml") reads the first folder and .to_file("places.shp") writes it, with the same one-kind-of-shape rule.
Questions about converting KML to Shapefile
Can Google Earth save a KML as a shapefile?
No. Google Earth Pro can open a shapefile (File → Open, file type ESRI Shape), but it only saves KML and KMZ. Google My Maps exports KML and KMZ only too. Convert the export here, or in QGIS or ArcGIS.
Why did I get three shapefiles instead of one?
Your KML mixes points, lines and areas, and a shapefile holds one kind of shape. The zip has one layer per kind, such as places_points, places_lines and places_areas. Add all of them in QGIS or ArcGIS to see the whole map.
Why are my column names cut off after converting KML to SHP?
The shapefile’s attribute table (.dbf) allows 10 characters per column name, so description becomes descriptio and opening_hours becomes opening_ho. The notes under the map list every renamed field.
How do I convert KML to shapefile in QGIS or ArcGIS Pro?
In QGIS, drag the KML onto the map, right-click the layer and choose Export → Save Features As, with the format ESRI Shapefile. Do it once per layer if QGIS split the KML into points, lines and polygons. In ArcGIS Pro, run KML To Layer, then Feature Class To Shapefile on the result.
What coordinate system will the shapefile use?
WGS 84 (EPSG:4326), as in the KML, written in the .prj file. For a local grid such as UTM, reproject the layer in QGIS or with the Project tool in ArcGIS Pro.
Is my KML file uploaded anywhere?
No. Your browser reads and converts the file on your computer, and nothing is sent to Spatibase or anyone else. Only the background map tiles come from the internet.
Moving the places into Spatibase? Read how to import your data. Need another pair of formats? The GIS file converter converts between all of them.