- Home
- KML to GeoJSON Converter
100% private — files never leave your browser
KML to GeoJSON Converter
Turn .kml files into .geojson that loads into Leaflet, Mapbox, QGIS and every JSON-native tool. Lines and gx:Tracks convert with elevation and timestamps, one feature per placemark — all processed locally in your browser.
How to convert to GeoJSON
- 1
Drop your file
Drag a FIT, GPX, TCX, KML, KMZ or GeoJSON file onto the box above, or click it to browse. The source format is detected automatically from the file contents.
- 2
Wait a beat
The conversion runs in a background worker on your device. Typical activities finish in well under a second; even 50 MB files process without freezing the page.
- 3
Check the preview
Distance, duration, ascent and average heart rate are shown alongside a map of the converted track, so you can confirm nothing was lost before downloading.
- 4
Download
Click the download button and the .geojson file is saved straight from memory. Nothing was uploaded, so there is nothing to clean up.
What is a KML file?
KML (Keyhole Markup Language) is the XML dialect born inside Keyhole — the software that became Google Earth — and later standardized by the OGC. It describes geographic features for display: placemarks, lines, polygons and images, each with the styling and folders that make a KML file read like a curated map rather than a raw data dump. Google Earth, Google My Maps and most desktop GIS packages open it natively.
KML is a mapping format, not a training format. Its geometry carries position and elevation well — and Google's gx:Track extension can even carry per-point timestamps for time-slider playback — but it has no concept of heart rate, cadence or power. Converting an activity to KML is the right move when the goal is showing a route to humans; when the goal is analyzing a workout, the fitness formats are the right home for the data.
What is a GeoJSON file?
GeoJSON (RFC 7946) is the JSON dialect of geography — the format the modern web speaks natively. Mapping libraries (Leaflet, Mapbox GL, D3, Deck.gl), data-journalism tools (Datawrapper, Flourish), GIS suites (QGIS, PostGIS) and half the data-science Python stack all consume it without ceremony. A file is a FeatureCollection of geometries, coordinates are written as [longitude, latitude] pairs, and properties ride along as plain JSON.
Like KML, GeoJSON is about geography rather than training. It has no native slots for heart rate or power, though tools freely attach custom properties — the widely used togeojson convention stores per-point timestamps in coordinateProperties.times, which this converter both reads and writes. If the destination is a web map, a dashboard or a data pipeline, GeoJSON is almost always the shortest path.
Why hop from KML to GeoJSON?
These are the two lingua francas of web mapping, and they don't overlap much: KML comes from the Google Earth world — drawn routes, shared maps, park-services data — while GeoJSON is what Leaflet, Mapbox GL, D3, Deck.gl and most data tooling consume natively. Moving a KML route onto a web map, into a dashboard, or into a data analysis usually means this one conversion, and then everything downstream just works.
It's also the reliable path for tools that claim KML support but implement it poorly. Many GIS and BI tools import GeoJSON flawlessly while their KML import drops gx:Track timestamps or mangles MultiGeometry. Converting first, with a converter that handles both correctly, sidesteps the whole class of import bugs.
What the conversion produces
Each placemark's line geometry becomes a Feature: LineStrings directly, gx:Tracks as LineStrings with their timestamps written into coordinateProperties.times (the togeojson convention). MultiGeometry lines become one feature per line, in document order, and elevation carries over as the third coordinate. Placemark names land in feature properties where web maps use them as labels.
Honest scope: points and polygons in the KML aren't line geometry and are skipped; styling (icons, colors, balloons) is KML display chrome with no GeoJSON equivalent and is dropped. The output is pure, standards-compliant RFC 7946 — geometry, elevation, time, names — which is exactly what data tooling wants.
Your files never leave this browser
This tool — like every tool on this site — runs entirely as client-side JavaScript. The file you drop is parsed in a Web Worker on your own device, converted in memory and handed straight back to you as a download. There is no upload endpoint, no server-side conversion service and no temporary storage: you can watch the network tab in your browser's developer tools and confirm that no file bytes are transmitted anywhere.
That matters more with fitness data than with most files. A GPS track is a precise log of where you were, at what time, and how hard your heart was working — home address, training habits, favorite routes and race schedule all in one file. Keeping conversion on-device means third-party converters never get a copy of that log, and the tool keeps working identically on a plane, in a basement, or anywhere else without signal.
KML vs GeoJSON at a glance
| Aspect | KML | GeoJSON |
|---|---|---|
| Format type | Display XML (Google Earth) | JSON (RFC 7946) |
| Typical use | Earth visualization, My Maps | Web maps, GIS, data pipelines |
| Line geometry | LineString / gx:Track | LineString features |
| Timestamps | gx:Track <when> | coordinateProperties.times |
| Styling | Rich (icons, balloons) | None — data only |
| Best for | Google ecosystem display | Everything JSON-native |
Frequently asked questions
Yes. Each point's time becomes an ISO string in coordinateProperties.times — the same convention Mapbox's togeojson established — so web maps and scripts can animate or analyze the track temporally, not just draw it.