Convert KML to Shapefile (SHP)

This free converter turns KML files from Google Earth or My Maps into shapefiles for ArcGIS Pro or QGIS, with a .prj and .cpg file included. Your file is processed in the browser and is not uploaded. Points, lines and polygons become separate shapefiles, field names are cut to 10 characters, and the KML colors are kept as fields such as line_color and fill_color.

Did a file not convert correctly? E-mail [email protected], ideally with a small sample file, and it will be fixed.

Key facts

KML to Shapefile: why convert

Google Earth and My Maps export KML, but many GIS programs, authorities and clients still ask for shapefiles. This converter turns your KML into shapefiles you can open directly in ArcGIS Pro, QGIS or AutoCAD Map 3D. It handles the things that usually go wrong: mixed geometry types, long field names, special characters and the coordinate system. Everything runs in your browser with GDAL, so your file is never uploaded.

How to convert KML to Shapefile

  1. Drop your .kml file in the box, or click to choose it.
  2. Optionally choose a coordinate system for the output, for example a UTM zone.
  3. Click Convert and download a .zip with the shapefiles.

What changes when you convert

Points, lines and polygons are split

A KML file can mix placemarks of every type, but a shapefile can only hold one geometry type. The converter therefore writes one shapefile per type, for example Sights_points.shp and Routes_lines.shp, and packs them in one .zip. Converters that skip this step silently drop everything except the first type.

Field names are cut to 10 characters

The shapefile attribute table (.dbf) only allows field names of up to 10 characters, so "Description" becomes "Descriptio". Extra fields stored as KML ExtendedData, such as My Maps columns, become fields too and are shortened the same way. Text values longer than 254 characters, such as long HTML descriptions, are cut off. KML from ArcGIS often has no ExtendedData but an HTML table of field names and values in each description; every row of that table becomes a field of its own, and Description keeps only the text outside the table.

The coordinate system is included

KML is always WGS84. By default the shapefile stays in WGS84 (EPSG:4326) and gets a .prj file so GIS programs place it correctly. Choose a projected system such as a UTM zone if you need to measure distances and areas in meters.

Special characters survive

The attribute table is written as UTF-8 and a .cpg file tells ArcGIS and QGIS which encoding to use, so names with characters like æ, ø, ü or é display correctly.

Styles and folders

A shapefile cannot store colors, so the colors of each placemark's icon, line and fill are written as the fields icon_color, line_color and fill_color (#rrggbb), together with line_width, line_opac and fill_opac. A .qml style file next to each shapefile makes QGIS draw every placemark in these colors as soon as you add the layer; in ArcGIS you can use the fields for symbology. Icon images are not carried over. Each KML folder becomes its own shapefile, named after the folder.

Example: a Freedom Trail walk in Boston from Google My Maps to shapefile

The example file freedom_trail_boston.kml is laid out like a Google My Maps export: two stops (Boston Common and the Old State House) with the My Maps columns category and stop_number, a walking route as a line and Boston Common as a polygon, each in its own color. The shapes are simplified and made up.

After you open it, the status line says "Ready: 4 features in 1 layer." and that the colors from the KML styles were kept as fields. The download, freedom_trail_boston_shp.zip, holds three shapefiles, because a shapefile can hold only one geometry type: freedom_trail_boston_points (2 points), freedom_trail_boston_lines (1 line) and freedom_trail_boston_polygons (1 polygon), each with .shp, .shx, .dbf, .prj (WGS84), .cpg and a .qml style file. The fields are Name, Descriptio (Description cut to 10 characters), category, stop_numbe (stop_number cut the same way) and the colors icon_color, line_color, fill_color, line_width, line_opac and fill_opac; the park's fill_color is #00aa00 with fill_opac 0.4. When you add a .shp in QGIS, the .qml draws each feature in its original color.

freedom_trail_boston.kml       freedom_trail_boston_shp.zip
├─ 2 points         →     ├─ freedom_trail_boston_points.shp (+ .shx .dbf .prj .cpg .qml)
├─ 1 line           →     ├─ freedom_trail_boston_lines.shp (+ …)
└─ 1 polygon        →     └─ freedom_trail_boston_polygons.shp (+ …)

Download the example file freedom_trail_boston.kml (2 KB) and convert it above

Common problems in QGIS and ArcGIS, and what this page does

Next: convert the shapefile back to KML, view a shapefile on a map or extract the KML from a KMZ.

About the formats

KML

KML (Keyhole Markup Language) is the XML format behind Google Earth and Google My Maps, and an OGC standard since 2008. Besides geometry it can hold styles, icons, folders and descriptions in HTML.

  • Always WGS84 longitude, latitude and optional altitude.
  • Folders group placemarks; each folder can become its own layer when converting.
  • Styles (colors, line widths, icons) are specific to KML and Google Earth.

Shapefile

The Esri Shapefile is the most widely used GIS vector format. A single "shapefile" is really a set of files with the same name: .shp holds the geometry, .shx an index, .dbf the attribute table, and the optional .prj the coordinate system and .cpg the text encoding.

  • Needs at least .shp, .shx and .dbf. Select them together or as one .zip.
  • Field names are limited to 10 characters and text values to 254 characters.
  • Each shapefile holds one geometry type only: points, lines or polygons.
  • Without a .prj file the coordinate system is unknown.

Frequently asked questions

Which files do I get in the zip?

For every shapefile you get .shp (geometry), .shx (index), .dbf (attributes), .prj (coordinate system) and .cpg (encoding). Keep them together; most programs need all of them.

Can I open the result in ArcGIS Pro and QGIS?

Yes. Unzip the download and add the .shp file. Both programs read the .prj and .cpg files automatically.

Does the altitude from Google Earth survive?

Yes. Coordinates with altitude are written as 3D shapefiles (PointZ, PolylineZ, PolygonZ).

Is there a size limit?

The limit is your browser's memory. Files up to about 200 MB normally work. For larger files, use ogr2ogr from GDAL on your own computer.

Step-by-step guides