Live Online Converterkml → geojson

KML to GeoJSON Converter

Converts a KML file to GeoJSON with GDAL's ogr2ogr, one GeoJSON per KML folder.

Upload a .kml file. GDAL reads each folder as a layer. Because a GeoJSON file holds only one layer, a KML with several folders gives a ZIP with one .geojson per folder. Coordinates stay longitude/latitude, heights stay as third coordinate.

Drag a file here to convert, or select file

Accepted: .kml · max. 50 MB

Direct upload to the GDAL worker (Fly.io, Frankfurt)Files are deleted after the conversion

What the converter does

  • Each KML folder becomes a layer; placemarks directly in the document form a layer named after the document.
  • One layer gives one .geojson file; several layers give a ZIP with one .geojson per layer.
  • ExtendedData values become GeoJSON properties (in the test: linien and barrierefreiheit_status).
  • Heights stay as the third coordinate (points become PointZ, lines LineStringZ).
  • GDAL's KML reader adds its own properties such as tessellate, extrude and visibility.
  • The report below the upload shows layers and features read and written, skipped layers with the reason, GDAL's warnings and the exact commands.

GDAL command the worker runs

sh — gdal
$ogr2ogr -f GeoJSON converted.geojson input.kml Haltestellen

Haltestellen stands for the only folder (layer) in the KML. With several folders the worker runs one command per layer, e.g. ogr2ogr -f GeoJSON layers/Wege.geojson input.kml Wege, and packs the files into a ZIP.

Tested with

Test fileResult
KML with 1 placemark in the document and 2 folders: Haltestellen (2 points with ExtendedData), Wege (1 line with heights)ZIP with Testkarte.geojson (1), Haltestellen.geojson (2), Wege.geojson (1); 4 of 4 features; ExtendedData as properties; PointZ and LineStringZ

Tested on 24 Sep 2026 with the worker code of this site and GDAL 3.10.3 (conda-forge build on Windows). The worker image runs the Debian build of the same GDAL version; the live worker was not part of these tests.

Limits

  • Upload limit: 50 MB per file.
  • Only .kml is accepted, not .kmz. A KMZ is a ZIP archive: unpack it and upload the .kml inside.
  • Each GDAL step may run for up to 240 seconds; a longer run is stopped with an error message.

Frequently Asked Questions

Why do I get several GeoJSON files?

A GeoJSON file holds one layer, a KML can hold many folders. The worker keeps the folders apart and writes one .geojson per folder into a ZIP.

Are the ExtendedData fields kept?

Yes. In the test the ExtendedData fields linien and barrierefreiheit_status arrived as GeoJSON properties.

What happens to my file?

Your browser uploads it directly to the GDAL worker on Fly.io (region Frankfurt). The worker converts it in a temporary folder and deletes the folder after sending the result, or immediately if the conversion fails. Files are not stored permanently.

Related conversions