KML to GeoJSON converter

Drop in a .kml file from Google Earth or paste the KML. You get GeoJSON back straight away, and nothing is uploaded.

Drop a KML file anywhere on this panel, or paste its contents.

GeoJSON

Your GeoJSON appears here, ready to copy or download.

How to convert KML to GeoJSON

  1. 1

    Add the KML

    Drop the .kml file onto the panel, choose it from your computer, or paste the text.

  2. 2

    Check the result

    The GeoJSON appears beside it with a count of features and the polygon area in hectares.

  3. 3

    Download or copy

    Save a .geojson file or copy the text into your code, QGIS or a web map.

What the converter does with your KML

KML is the format Google Earth saves. GeoJSON is what web maps, databases and most APIs expect. Both store longitude and latitude in degrees (WGS 84), so converting between them changes the structure of the file and not the positions in it.

Every Placemark becomes a feature. Points, lines and polygons keep their shape, and inner boundaries become holes. A MultiGeometry of one kind becomes a MultiPolygon, MultiLineString or MultiPoint. If a placemark mixes kinds, it is written as one feature per kind so that every tool can read the result.

A ring that was left unclosed is closed, because GeoJSON requires the first and last position of a ring to match. Folders are flattened: the features keep their order, and the folder names are dropped.

Going the other way? Use the GeoJSON to KML converter. To find out how big the polygons are, use the polygon area calculator.

FAQ

KML to GeoJSON, in detail