KML GEOJSON
File conversion

Convert KML to GEOJSON

QUICK ANSWER
Is it possible to convert KML to GEOJSON?
Yes - KML converts to GEOJSON.

The fastest path is one ogr2ogr command; QGIS offers the same result with a point-and-click workflow. Styling information (icon colors, line widths, label styles) is not carried into GeoJSON - only geometry and attributes transfer.

Also to GEOJSON: SHP · OSM · GPX

On this page

Tested on macOS, Windows & Linux
Last verified Oct 2026

More free converters

HEIC, PNG, WEBP, MP3 and more - every tool here is free.

Open the toolbox

Why convert KML to GEOJSON?

KML is an XML-based geographic format (introduced 2004, adopted as an OGC standard in 2008) commonly produced by Google Earth and Google My Maps. GeoJSON is a JSON-based geospatial format (IETF RFC 7946, 2016) natively supported by web mapping libraries and rendered directly by GitHub. Converting from KML to .geojson is typically done to make location data usable on the web without a dedicated GIS client.

How to convert KML to GEOJSON

QGIS FREE

Add the .kml file as a vector layer, then right-click the layer and choose Export > Save Features As, setting the format to GeoJSON.

ogr2ogr OPEN-SOURCE

Run ogr2ogr -f GeoJSON output.geojson input.kml; ogr2ogr also reads .kmz files directly without unzipping.

About these formats

Quality & what to watch

  • Geometry (points, lines, polygons) transfers accurately; KML styling (colors, icon sizes, label styles) is lost and must be defined separately in the target mapping application.
  • KML folders and placemarks may map to separate feature collections depending on the tool and flags used.
  • KML NetworkLink elements referencing live remote data are not followed; only static geometry in the file is exported.

Frequently asked questions

Does ogr2ogr handle KMZ files too?
Yes - ogr2ogr reads .kmz (a zipped KML) directly, so there is no need to unzip before converting.
Will coordinates change during the conversion?
No - both KML and GeoJSON use WGS 84, so no reprojection occurs.
Is the GeoJSON output larger than the original KML?
GeoJSON is plain JSON text and can be larger than an equivalent KML, especially for dense datasets.