KML to GeoJSON Converter
Convert a Google Maps or Google Earth export to GeoJSON in one step. A live map preview shows your points, lines, and polygons before you download. No command line, no account.
Drop your KML or KMZ file here
or
.kml and .kmz accepted - converted locally, nothing uploaded
Filter by feature type
How to convert KML to GeoJSON
- Export your map from Google Maps ("Download your data") or Google Earth as KML or KMZ
- Drop the file onto the upload area above
- Adjust coordinate precision and output format as needed
- Copy to clipboard, open directly in geojson.io, or download the .geojson file
What geometry types are supported?
- Points - placemarks, saved pins, named locations
- Lines - routes, paths, LineString elements from Google Earth
- Polygons - areas, boundaries, regions with inner rings
- MultiGeometry - collections of mixed geometry types in one placemark
- Folders - nested KML folder structures are flattened into one FeatureCollection
- KMZ - compressed KML archives are extracted and parsed automatically
- ExtendedData - custom properties and SimpleData fields are preserved
Learn more: what KML carries that GeoJSON does not
Two formats built for different jobs
KML stands for Keyhole Markup Language. Google Earth Blog's history of Keyhole and KML says Keyhole, Inc was formed in 2001 to build a product called Earth Viewer, and that Google bought the company in 2004. KML came out of that globe viewer, which is why it has concepts a flat map format does not.
One is altitude. Google's KML reference says a placemark's altitudeMode defaults to clampToGround, which ignores the altitude value and places the feature on the terrain. This converter does not read altitudeMode. It keeps the altitude as the third number of each coordinate, so a value from a clamped feature may not be a real elevation.
If every vertex in a geometry has altitude 0 or none, the output has plain [lon, lat] pairs. If any vertex has a nonzero altitude, every vertex in that geometry gets a third number, with 0 filled in where it was missing.
Where styling is translated
KML stores styles inline in a placemark or in a shared Style that a styleUrl points at. The converter resolves both and writes simplestyle-spec properties: stroke, stroke-width, stroke-opacity, fill, fill-opacity and, for icons, the icon address in marker-symbol.
KML colors are not RRGGBB. The reference says the order is aabbggrr: alpha, blue, green, red. Its example, 7fff0000, is blue at 50% opacity, so 7f is alpha and ff is blue. The converter reorders this to #rrggbb and reports the alpha as an opacity.
A StyleMap pairs a normal and a highlight style. The converter follows the normal pair and ignores highlight, since GeoJSON has no hover state.
FAQ
What is the difference between .kml and .kmz?
Google's documentation says a KMZ holds a main KML file plus any supporting files, such as images, packaged in one zip archive. The main file is named doc.kml by default. The converter unzips a KMZ, uses doc.kml if present, and otherwise takes the first .kml file inside.
Are custom data fields kept?
Yes. ExtendedData entries, both Data and SimpleData forms, become properties on the feature. A Data entry with an empty value is skipped. The placemark name, description and folder name come through too, and you can strip descriptions in the options.
Why do my colors look wrong after conversion elsewhere?
KML colors are written alpha, blue, green, red, so reading them as RGB swaps the red and blue channels. This converter reorders them to #rrggbb for you. A color from a different tool that does not do the same may show swapped.