Back to Blog
Glowing teal and orange lines on a dark navy background showing Calgary's bikeway network, converted from the city's open KML data to GeoJSON.

KML to GeoJSON: what carries over and what gets left behind

November 11, 2026
Ben Arledge

Google is stopping new downloads of Google Earth Pro for desktop on June 25, 2027. That's on Google Earth Help, and the Google Earth Team's community post adds that if you already have it, or download it before that date, you can keep using it after. So nothing breaks overnight, but a new laptop won't be able to install it after June, and plenty of people have years of placemarks and paths in KML files that only ever got opened in Earth Pro.

If that's headed for a web map, it'll probably end up as GeoJSON. Our August KML migration checklist covers the bigger picture. This post is narrower: what actually comes out the other side of a converter?

How we checked

Our KML to GeoJSON tool runs in your browser, and it's built on the open source @mapbox/togeojson library (our formats page says so). We ran the conversion code the tool page loads against two files: a test KML with one of almost everything KML can hold, and the City of Calgary's Bikeways dataset, exported as KML from the city's open data portal. That second one is also what the map at the top is drawn from.

The rest comes from the specs, OGC KML 2.3 and RFC 7946 for GeoJSON. Other converters make their own choices, so treat this as how ours behaves.

The short version

Comes across:

  • Points, lines and polygons, holes included
  • Name, description, address and the placemark's id
  • ExtendedData fields, both kinds
  • Timestamps, time spans and gx:Track times
  • Altitude values (but not what they mean, more on that below)

Left behind:

  • Folders and the document structure
  • Most styling (a few colours and widths sneak through as plain properties)
  • NetworkLinks, GroundOverlays, ScreenOverlays and PhotoOverlays
  • 3D models and tours
  • Placemarks with no geometry
  • Altitude modes
  • Anything inside a KMZ, until you unzip it

Coordinates: the good news

Both formats put longitude first, then latitude, then an optional altitude. KML writes -114.0719,51.0447 and GeoJSON writes [-114.0719, 51.0447], both in WGS 84 decimal degrees. Nothing gets swapped or reprojected, so if your points land in the ocean, the problem was already in the KML.

Names, descriptions and ExtendedData become properties

Each Placemark becomes a GeoJSON Feature. Its name, description and address land in the feature's properties, and the Placemark's id attribute becomes the feature's id.

ExtendedData comes along too. Both <Data> and schema-based <SimpleData> fields become properties with the same names. The catch is that every value comes across as text, so a capacity of 300 becomes "300", and the Schema that said it was an integer is gone. If you plan to filter or colour by numbers, convert those fields after.

Descriptions come across as raw text, HTML included. If your balloons pointed at images packed inside a KMZ, those links now point at files that didn't come with you.

Styles: mostly left behind

RFC 7946 has no styling at all, just geometry and properties. So a converter either drops your styles or turns some of them into properties. Ours does a little of both. When a placemark uses a shared Style (or the normal half of a StyleMap), these come across:

  • line colour and opacity, as stroke and stroke-opacity
  • line width, as stroke-width
  • polygon fill colour and opacity, as fill and fill-opacity
  • the icon image URL, as icon

KML stores colours as aabbggrr hex, and the converter flips them into regular #rrggbb plus an opacity. The names follow Mapbox's simplestyle spec, which some map tools read. Whether yours draws them is up to the tool.

What doesn't come across: icon size, label styles, balloon styles and the highlight state of a StyleMap. One quirk: the properties come from the whole shared style, so a line can end up with a fill and an icon it never used. Every bikeway line in the Calgary file came across with a fill colour from its default polygon style. Harmless, but clean it up if you style from properties.

Folders get flattened

KML folders give you a tree. A GeoJSON FeatureCollection is a flat list, and folder and document names aren't kept. If the folder tells you what a feature is, like "Campsites" or "Trailheads", save each folder as its own KML from Earth Pro and convert them separately. Then Batch files to GeoJSON can merge them into one file, and each feature gets a source_file property saying which file it came from.

Time comes along as text

A TimeStamp becomes a timestamp property, a TimeSpan becomes timespan with a begin and end, and a gx:Track becomes a LineString with a coordTimes list holding one time per point. Nothing in GeoJSON plays them back, but the data is there.

Altitude: the numbers survive, the meaning doesn't

A third coordinate value is kept. The altitudeMode beside it is dropped, along with extrude and tessellate.

  • In KML, clampToGround (the default) ignores the altitude and drapes the feature on the terrain. relativeToGround means metres above the ground. absolute means metres above sea level, which the OGC spec measures from the EGM96 geoid.
  • In GeoJSON, RFC 7946 says the third value is height in metres above or below the WGS 84 ellipsoid.

So a drone path flown 120 m above the ground comes across as 120 m above the ellipsoid, which could be underground. Flat web maps mostly ignore the third value, but if you're doing anything 3D, sort out heights before you convert.

Things that don't come across at all

These get dropped quietly, with no warning in the output.

  • NetworkLinks. The link isn't followed. A file that's only a NetworkLink converts to an empty FeatureCollection. Open the linked URL, save that KML, and convert it directly.
  • GroundOverlay, ScreenOverlay and PhotoOverlay. These are images, and GeoJSON doesn't hold images. Keep the image file and the overlay's north, south, east and west edges, and add it to your web map as an image layer.
  • 3D Models. A Placemark whose geometry is a Model is dropped entirely, name and all.
  • Tours. Fly-throughs are camera moves, not features.
  • Placemarks with no geometry. In the Calgary Bikeways export we tested, 4,929 placemarks became 4,928 features. The missing one had attributes but an empty geometry.

MultiGeometry does come across, as a GeometryCollection. That's valid GeoJSON, but RFC 7946 says to avoid a GeometryCollection when a single MultiPoint, MultiLineString or MultiPolygon would do, and some tools don't handle them well.

KMZ: unzip it first

A KMZ is a ZIP archive with a KML file inside, plus any images it uses. The tool takes .kml files or pasted KML, not .kmz. Rename the file to .zip, unzip it, and convert the main KML inside, which is usually called doc.kml. The images in the archive stay behind.

The tools also have a 10 MB file limit. The Calgary KML is about 13 MB, so we ran it outside the page with the same code. If yours is over, split it by folder first.

How to check your result

  1. Count. Compare placemarks in with features out. If the number dropped, look for models and placemarks with no geometry.
  2. Spot check. Open the result in the editor and click a few features. Check the names and ExtendedData fields, and whether any need turning back into numbers.
  3. Validate. Run it through the GeoJSON validator, which checks the root type, coordinates and polygon rings. If it flags a ring that doesn't close, the GeoJSON fixer can close it.
  4. Keep the original. If you ever need to go back to Google Earth, GeoJSON to KML writes simple placemarks with your properties in the description. It won't rebuild your old styles or folders, so hang on to the KML.

Before June 2027

Earth Pro keeps working for anyone who has it, so there's time. The geometry and data move over fine. What doesn't move is how things looked and how they were organised, so write down what your folders and colours meant before you convert.

When you're ready, try the KML to GeoJSON converter. It runs in your browser, so the file stays on your device. More on that on the how privacy works page.

Map data: Contains information licensed under the Open Government Licence – City of Calgary.