Guides ·
How to convert KML to shapefile
A KML from Google Earth or My Maps is one file that can hold pins, paths and areas together. A shapefile is the opposite: a small set of files that holds one kind of shape. This guide explains what a shapefile is made of, what changes when a KML becomes one, and how to convert it in QGIS or your browser.

What a shapefile is made of
A shapefile is not one file. It is a group of files with the same name, side by side in one folder. The .shp file holds the shapes: the coordinates of every point, line or polygon. The .shx file is an index, so a program can jump straight to shape number 500. The .dbf file is the attribute table, one row per shape, in the old dBASE format.
Those three are required. Two more are optional but nearly always wanted: the .prj file says which coordinate system the numbers are in, and the .cpg file names the text encoding, such as UTF-8, so accents and other alphabets survive. Without a .prj, your GIS has to guess where on Earth the shapes belong.
So a shapefile travels as a set. Zip the whole set before you email or upload it; a lone .shp is not usable.
Why one KML can become several shapefiles
Esri's rule is that a shapefile stores features of one geometry type. A KML has no such rule: a single file can mix pins (points), paths (lines) and areas (polygons).
So a KML with all three becomes up to three shapefiles, one per kind. The unmake converter names them with _points, _lines and _polygons at the end. Load all of them in your GIS to see the whole map again.
What happens to names, descriptions and data
Each KML placemark has a name, often a description, and sometimes extra fields stored as ExtendedData. In a shapefile they all become columns of the .dbf table.
The .dbf has a strict limit: a field name can be at most 10 characters. So description becomes descriptio, and a field called feature_kind becomes feature_ki. If two field names only differ after the tenth character, rename them before converting; otherwise the converter renames one for you, and you lose track of which is which.
Plain KML data also has no types: every value is text. In our test, a number like 10 arrived as a text column. Change it to a number in your GIS before you sum it or colour shapes by it.

Coordinate system and heights
KML coordinates are always longitude and latitude on WGS 84, the system GPS uses. The shapefile keeps WGS 84 and says so in its .prj file. If your project uses a local grid, such as a UTM zone, reproject the shapefile in your GIS afterwards.
Heights can come along too: if the KML has a third value in its coordinates, the shapefile can keep it as a Z value for each point.
How to do it in QGIS
Drag the KML into QGIS. If it mixes geometry types, export one type at a time. Use Select Features by Expression with geometry_type($geometry) = 'Point', then right-click the layer and choose Export, Save Selected Features As. Pick ESRI Shapefile as the format and a file name ending in _points.
Repeat with 'Line' and 'Polygon'. The same dialog has a CRS setting, so you can reproject in the same step.
How to do it in the browser
The unmake KML to SHP converter does the sorting for you. Drop the KML or KMZ and it shows the shapes on a map with a count, such as 2 lines and 2 points. Press Convert to Shapefile and it writes one zip with a .shp, .shx, .dbf, .prj and .cpg for each geometry type.
Before you download, it reads its own zip back and compares features, coordinates and attribute values with your KML. Anything it could not carry is named on a Not carried over line. The file stays on your device unless you share it.
A worked example: a smiley over the Salar de Uyuni
- Our demo file smiley-uyuni.kml was drawn by a script, not walked: a 10 km circle and a smile as two paths, and two eyes as points, all at 3,656 m over the salt flat in Bolivia.
- Drop it into the KML to SHP converter. The panel reads 4 features, 2 lines and 2 points, 24.04 mi. Details shows Lines: 2 lines, 24.04 mi (38.68 km), and the coordinate system WGS 84 (EPSG:4326).
- Open the table (More, then Table). It has four columns: name, description, feature_kind and diameter_km.
- Press Convert to Shapefile. The panel shows smiley-uyuni.zip, 2.9 KB. A Not carried over line names the KML's document description, which a shapefile has no place for. Then three checks: 4 features, all 90 coordinates (largest difference 0.000 m) and 16 of 16 attribute values.
- Unzip it: 10 files. Five belong to smiley-uyuni_lines (the circle and the smile) and five to smiley-uyuni_points (the eyes): .shp, .shx, .dbf, .prj and .cpg for each.
- Open the .dbf in your GIS: the columns are now name, descriptio, feature_ki and diameter_k, and diameter_k is a text column. The .cpg says UTF-8, the .prj says WGS 84, and the shapes carry the 3,656 m height as Z values.
Common mistakes
- Sending only the .shp. Without the .shx and .dbf most programs refuse to open it, and without the .prj they guess its location. Zip and send the whole set.
- Expecting one shapefile from a mixed KML. You get one per geometry type.
- Long field names that start the same. Cut to 10 characters, population_2020 and population_2024 are both population, so the converter renames the second one populatio1. Rename them yourself first so you know which is which.
- Treating numbers from KML data as numbers. They arrive as text; convert the column in your GIS before you do sums.
- Changing the .prj to reproject. It changes the label, not the coordinates. Reproject with your GIS's save or export dialog instead.
Questions
Can one shapefile hold points and lines together?
No. A shapefile stores features of one geometry type, so points, lines and polygons each need their own shapefile.
Why is my description column called descriptio?
Shapefile field names are limited to 10 characters, so longer names are cut.
Will my KML colours, icons and folders come along?
No. A shapefile has no styles or folders. The converter names what it could not carry on a Not carried over line; set colours again in your GIS.
Which coordinate system will the shapefile use?
WGS 84, the same as the KML, with a matching .prj file. Reproject in your GIS if you need a local grid.
Sample file: smiley-uyuni.kml (a demo drawn by script over the Salar de Uyuni, not a real route) · ours (made by unmake)
Sources
- Esri ArcGIS Pro: Shapefiles in ArcGIS Pro (file extensions, one geometry type, 10-character field names)
- OGC KML 2.3 standard (coordinates as longitude, latitude on WGS 84)
- QGIS User Guide: Creating new layers from an existing layer (Export, Save Features As)
- QGIS User Guide: expression functions (geometry_type)