KML to Shapefile Converter
Convert a KML or KMZ file to shapefiles in one ZIP, with names, descriptions and data fields as columns, without uploading the file.
How to convert KML to Shapefile
Add the KML or KMZ file
Drop the file on the map above or press Choose a file. A KMZ works without unzipping.
Choose what to convert
The map and the panel show what is in the file, and the export holds what is shown: untick folders you want to leave out. To convert one folder only, with the folders inside it, press Choose folder beside it in the panel.
Download the Shapefile ZIP
Press Download Shapefile (ZIP). A line under the map lists any column names that had to be shortened, each as its full name and its new one, and the ZIP holds a file named columns.txt with every column's full name.
Open it in your GIS program
Unzip the file and open the .shp file in your GIS program, with the .shx and .dbf files beside it: Esri lists all three as required parts of a shapefile, and the .prj file as the one that records its coordinate system.
What a KML file holds and how its parts are read: how to open a KML or KMZ file.
What is in the ZIP
A shapefile is several files with the same name: the .shp file holds the shapes, the .shx file indexes them, and the .dbf file is a table with one row of attributes for each shape. In the ZIP, each shapefile also has a .prj file, which records its coordinate system (WGS 84 longitude and latitude, the system KML uses), and a .cpg file, which says that the text in the table is UTF-8.
Esri's shapefile specification requires every shape in one shapefile to be of the same type, while one KML file can mix points, paths and polygons. So the ZIP holds up to three shapefiles, one for each kind the file contains: points.shp, lines.shp and polygons.shp, each with its own .shx, .dbf, .prj and .cpg files. A placemark gives one record in each shapefile it has shapes for: the parts of a multi-geometry stay together in one record, a placemark with several points becomes a multipoint record, and a Google Earth track (gx:Track) is written as a line. Polygon rings are written with outer rings clockwise and holes counterclockwise.
Columns and the 10-character limit
Each shape's name becomes the column name, and its description, as plain text without its HTML, the column descriptio, cut to 10 characters like every longer name. Every data field the placemark carries in its ExtendedData becomes a column too.
Shapefiles keep attributes in a dBASE table, and Esri's help says that dBASE limits field names to 10 characters. So the converter changes every character other than a letter, a digit or an underscore to an underscore and cuts the name to 10 characters; where two names would then be the same, ignoring case, the later one ends in _1, _2 and so on. The line under the map lists every renamed column with its full name, and columns.txt in the ZIP lists them all, so you can rename them back or set an alias in your GIS program.
Esri also gives 254 characters as the width of a dBASE text field, and notes that shapefile date fields cannot hold a time of day. Every column the converter writes is a text column of up to 254 bytes of UTF-8 text: a longer value is cut after the last whole character that fits, and letters outside English take more than one byte each. Time stamps from the file are kept as text, with their time of day.
What a shapefile cannot keep
The .shp file stores only geometry and the .dbf file only attributes, so the file's styles (line colors and widths, fill colors, icons) are not in the ZIP. Image overlays are left out, folders do not carry over, and no column says which folder a placemark was in. Altitudes are dropped too: the shapes are written with longitude and latitude only. To keep styles and folders, convert to KML or KMZ instead, or to GeoJSON, which keeps the colors as properties.
KMZ to Shapefile
A KMZ is a zipped KML file, and the converter reads the KML inside it directly, so there is no need to rename it to .zip or extract doc.kml first. Icons and images packed in the KMZ have no place in a shapefile and are left out.
Your file is not uploaded
Many KML to Shapefile converters upload the file and build the ZIP on their server, some with a limit of a few free conversions. Here the ZIP is built in your browser, the file never leaves your device, and there is no limit on how many files you convert. How the converter works describes the tests.
Frequently asked questions
How do I convert KML to Shapefile?
Add the KML or KMZ file to this page and press Download Shapefile (ZIP). You get one ZIP with a .shp, .shx, .dbf, .prj and .cpg file for each kind of geometry in the file, and columns.txt.
Why are there several shapefiles in the ZIP?
A shapefile holds one kind of shape only, and a KML file can mix points, lines and polygons. Each kind gets its own shapefile.
Why were my column names shortened?
The .dbf table of a shapefile cannot have field names longer than 10 characters. The converter cuts them, keeps them unique, lists the changes under the map and writes every full name into columns.txt in the ZIP.
Which coordinate system does the shapefile use?
WGS 84 longitude and latitude, the same as the KML file, recorded in the .prj file. Reproject it in your GIS program if your project uses another system.
Are the KML colors and icons kept?
No. A shapefile has no place for styles, so colors, line widths and icons are not in it.
Can it convert a shapefile to KML?
No. The converter opens KML, KMZ, GPX and GeoJSON files, not shapefiles.
Is my file uploaded?
No. The ZIP is made in your browser and the file never leaves your device. Google Analytics, which counts visits, learns which format you exported, never the file, its names or its coordinates.