Convert KML to GeoPackage (GPKG)

This converter turns KML or KMZ files from Google Earth or My Maps into a single GeoPackage (.gpkg) for QGIS or ArcGIS Pro. Each KML folder becomes a layer, and a folder that mixes points, lines and polygons becomes one layer per type. ExtendedData columns become fields with their full names. The file is converted in your browser and is not uploaded.

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 GeoPackage: why convert

Google Earth, My Maps and many field apps share data as KML or KMZ, but KML is made for viewing: it has no typed fields, no spatial index and mixes every kind of shape in one file. To edit, style or analyse the data in QGIS or ArcGIS Pro, a GeoPackage is the better home. It is one SQLite file that holds many layers, keeps long field names and special characters, and is the default format of QGIS. This page opens the KML or KMZ in your browser with GDAL, the open-source library behind QGIS, and writes every folder as a GeoPackage layer, split by geometry type, with the My Maps columns and the colors of the placemarks as fields. Unlike a shapefile there is no 10-character limit on field names and no extra files to keep together. The KML never leaves your computer.

How to convert KML to GeoPackage

  1. Drop your .kml or .kmz file in the box, or click to choose it. You can drop several files at once.
  2. Check the placemarks on the map; optionally choose a projected coordinate system such as a UTM zone.
  3. Click Convert to GeoPackage and open the .gpkg in QGIS or ArcGIS Pro.

What changes when you convert

One layer per folder and geometry type

A KML folder can mix pins, paths and polygons, but QGIS and ArcGIS Pro style and edit a layer best when it has one geometry type. A folder with only one type becomes one layer named after the folder; a mixed folder becomes Folder_points, Folder_lines and Folder_polygons in the same .gpkg. The status line lists the layers that were split.

ExtendedData, descriptions and colors become fields

Columns from My Maps become text fields with their full names, and typed SchemaData fields from QGIS or ArcGIS keep their whole or decimal number type. KML from ArcGIS often has an HTML table of field names and values in each description instead; every row of that table becomes a field. The colors of each placemark's icon, line and fill are kept as the fields icon_color, line_color and fill_color (#rrggbb), with line_width, line_opac and fill_opac, which you can use for data-defined symbology.

The coordinate system

KML is always WGS84 longitude and latitude, so by default the layers are stored in EPSG:4326. Choose a projected system such as a UTM zone if you want to measure lengths and areas in meters; every layer is then reprojected and the GeoPackage records the new system.

Tracks, heights and overlays

Google Earth GPS tracks (gx:Track) become lines, and heights are kept as Z values. Image overlays in a KMZ, such as a scanned map, cannot go into a vector GeoPackage, so they are written next to it as the image with a world file and .prj that QGIS places on the map. Icons, labels and network links are not converted.

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.

GeoPackage

GeoPackage is an open OGC standard from 2014 built on SQLite. It is the default format in QGIS and can hold many layers, any coordinate system and long field names in a single file.

  • One file can contain many vector layers and tables, and raster tiles.
  • No 10-character limit on field names, unlike shapefiles.
  • Stores the coordinate system of each layer inside the file, so there is no separate .prj.
  • Has no 2 GB size limit per layer, unlike the .shp and .dbf files of a shapefile.

Frequently asked questions

Is my KML uploaded?

No. GDAL runs in your browser as WebAssembly, and the GeoPackage is written on your own computer.

Can I open the GeoPackage in ArcGIS Pro?

Yes. ArcGIS Pro reads and edits GeoPackages directly; add the .gpkg in the Catalog pane and drag a layer onto the map. In QGIS, drag the .gpkg into the Layers panel and pick the layers you want.

Why use a GeoPackage instead of a shapefile?

A GeoPackage is one file instead of five, holds all layers together, keeps field names longer than 10 characters and text longer than 254 characters, and stores letters like æ, ü or é without an encoding file. Use KML to Shapefile if a client or an old program asks for shapefiles.

Can I convert a GeoPackage back to KML?

Open the .gpkg in QGIS and use Export, Save Features As, KML. To get GeoJSON for a web map from the GeoPackage, use the GeoPackage to GeoJSON converter.