FreeKML → GeoJSON

KML to GeoJSON Converter

Turn KML and KMZ files into GeoJSON for web maps and GIS, and back again.

Runs in your browser. Files never leave your device.

GPX, KML, KMZ, GeoJSON, CSV, Excel, TCX or FIT · several at once · or drop them here

Converted on your device — files are never uploaded.

Quick answer

To convert KML to GeoJSON, add the .kml or .kmz file, keep GeoJSON as the output and press Convert. Each placemark becomes a Feature with its name, description, folder and data fields as properties, its colours as simplestyle properties, and Point, LineString, Polygon or Multi geometry. For GeoJSON to KML, add a GeoJSON file and choose KML.

Step-by-Step Guide

How to convert KML to GeoJSON

1

Add the KML or KMZ

Drop one or more files onto the page. GeoJSON files can be added to convert the other way.

2

Check the preview

See the shapes drawn out and counted.

3

Keep GeoJSON as the output

Indented for reading, or compact for the smallest file.

4

Convert and download

Load the .geojson into Leaflet, Mapbox, QGIS or geojson.io.

From Google Earth to web maps

GeoJSON is the format web map libraries such as Leaflet, Mapbox GL and OpenLayers load directly, and what most GIS tools exchange. The converter turns each KML placemark into a GeoJSON Feature: points, paths and areas keep their geometry (a MultiGeometry becomes a MultiPoint, MultiLineString, MultiPolygon or GeometryCollection), elevations stay as the third coordinate, and the placemark's name, description, folder path and ExtendedData fields become properties.

KML colours and line widths are written as simplestyle properties (stroke, stroke-width, fill, fill-opacity, marker-color), which geojson.io, GitHub and Mapbox use to draw the features the same way. Timed tracks keep their times in coordinateProperties.times, the convention used by togeojson and Mapbox.

It works the other way too: add a GeoJSON FeatureCollection and choose KML or KMZ. Properties become placemark data and simplestyle colours become KML styles. GeoJSON with projected coordinates (not latitude and longitude) can't be converted and is refused with a message.

Last updated

Why Use Ripify KML to GeoJSON

Every geometry type

Points, lines, polygons with holes, multi-geometries and collections.

Properties kept

Name, description, folder and every data field.

Colours

KML styles to simplestyle properties, and back.

Both directions

GeoJSON to KML and KMZ as well.

Readable output

Indented with one coordinate per line, or compact.

No upload

Converted in your browser.

Frequently Asked Questions

KML to GeoJSON FAQ

Can I convert GeoJSON to KML?▼
Yes. Add the .geojson or .json file and choose KML or KMZ. name and description properties become the placemark's name and description, other properties become data fields, and stroke and fill colours become KML styles.
What coordinate system does the GeoJSON use?▼
WGS 84 longitude and latitude, as the GeoJSON standard requires. Files in other coordinate systems need reprojecting first, for example in QGIS.
Are KML folders kept?▼
As a folder property on each feature (Folder/Subfolder), since GeoJSON has no folders. Converting back to KML rebuilds them.
Can I convert GPX to GeoJSON?▼
Yes. Add GPX files and choose GeoJSON: tracks become LineStrings (MultiLineString for several segments), with their times in coordinateProperties.

More Free Tools from Ripify