This KML to GeoJSON converter turns the KML you exported from Google Earth, My Maps, or a GIS tool into standard GeoJSON that mapping libraries like Leaflet, Mapbox, and OpenLayers can read directly. Switch the direction to go from GeoJSON to KML when you need to open your data back in Google Earth. Points, lines, polygons, and their placemark names and descriptions are carried across, and the GeoJSON side is pretty-printed so it is easy to scan and drop into code. Paste your markup or load a file with the file picker, then copy the result or download it with the right extension. It is built for GIS analysts, web-map developers, and anyone shuffling geodata between formats. Every conversion runs entirely in your browser, so your coordinates and place names are processed locally and never leave your device.
Features
Converts KML to GeoJSON and GeoJSON back to KML with a single direction toggle
Handles Points, LineStrings, Polygons, and MultiGeometry placemarks
Carries placemark name and description into GeoJSON feature properties
Pretty-prints the GeoJSON output so it is readable and diff-friendly
Load a .kml, .geojson, .json, or .xml file with the file picker, or paste directly
Copy the result or download it as data.geojson or data.kml
Clear, inline error messages for malformed XML or invalid JSON
Runs fully in your browser — no upload, so it works with private map data
How to use the KML to GeoJSON
Pick a direction: KML → GeoJSON or GeoJSON → KML.
Paste your KML or GeoJSON into the input box, or click Choose file to load one.
Read the converted output in the panel on the right.
Click Copy to grab the result, or download it as data.geojson or data.kml.
A KML Placemark Point becomes a GeoJSON Feature with its name in properties.
Common errors & troubleshooting
The output shows an "Invalid XML" error even though the file looks fine. — KML is XML, so every tag must be closed and nested correctly. Re-export the file, or paste the full document starting with the <kml> root element.
You loaded a .kmz file and nothing converts. — KMZ is a zipped KML. Unzip it first (rename to .zip and extract, or use Google Earth to export plain KML) and paste the resulting doc.kml.
Converting GeoJSON to KML fails with an "Invalid JSON" message. — Make sure the input is valid GeoJSON — a Feature, FeatureCollection, or Geometry object. Run it through a JSON formatter to spot a stray comma or bracket.
Styles, icons, and colors from the KML are missing in the GeoJSON. — GeoJSON is a geometry-and-properties format with no visual styling, so KML <Style> blocks are intentionally dropped. Re-apply styling in your map library.
Frequently asked questions
Can I convert a KMZ file?
Not directly. A KMZ is a ZIP archive containing a KML file (usually doc.kml) plus assets. Unzip it first — rename it to .zip and extract, or export plain KML from Google Earth — then paste or load the KML here.
Are KML styles and icons preserved in the GeoJSON?
No. GeoJSON only describes geometry and properties, so KML <Style>, <IconStyle>, and color elements have no equivalent and are dropped. The geometry, placemark names, and descriptions are kept; re-apply visual styling in your mapping library.
Which geometry types are supported?
Points, LineStrings, Polygons, and MultiGeometry from KML map to Point, LineString, Polygon, and their Multi* counterparts in GeoJSON, and the reverse works when converting GeoJSON back to KML.
Does GeoJSON → KML produce a Placemark for each feature?
Yes. Each GeoJSON Feature becomes a KML <Placemark> with its geometry, and a name or description in the feature's properties is written into the placemark so it labels correctly in Google Earth.
Is my map data uploaded when I convert it?
No. The KML to GeoJSON conversion runs entirely in your browser, so your coordinates and place names are processed locally and never leave your device.
Related tools
GPX to GeoJSON — Convert GPX to GeoJSON and back — GPS tracks, routes and waypoints to GeoJSON features, or GeoJSON back to a GPX file.
WKT to GeoJSON — Convert WKT (Well-Known Text) to GeoJSON and back, in your browser.
GeoJSON to CSV — Convert a GeoJSON FeatureCollection to CSV and back — Point features become latitude/longitude columns with their properties.
Coordinate Map Viewer — Plot a latitude/longitude on an OpenStreetMap map, or click the map to read coordinates back out.
JSON Formatter — Beautify, minify and validate JSON with error locations.
WKT to GeoJSON — Convert WKT (Well-Known Text) to GeoJSON and back, in your browser.
GeoJSON to CSV — Convert a GeoJSON FeatureCollection to CSV and back — Point features become latitude/longitude columns with their properties.
Plus Codes Converter — Convert between latitude/longitude and a Plus Code (Open Location Code) both ways, with the covered bounding box and cell size.
MGRS Converter — Convert between latitude/longitude and MGRS (Military Grid Reference System) coordinates, both ways, in your browser.
Distance Between Coordinates — Measure the great-circle distance between two latitude/longitude points in km, miles and nautical miles, with bearing and a map.
GPX Viewer — Open a GPX file and see its tracks, routes and waypoints on a map, with distance, elevation and bounds.
Coordinate Converter (DMS & Decimal) — Convert coordinates between decimal degrees, DMS and degrees-decimal-minutes, both ways, in your browser.
Geohash Converter — Encode latitude/longitude to a geohash and decode a geohash back to coordinates, with bounding box and neighbors.
Polyline Encoder & Decoder — Encode coordinates to a Google encoded polyline string and decode polylines back to coordinates or GeoJSON.
GeoJSON Viewer & Validator — Paste or drop GeoJSON to validate it and see its features on a map, with feature counts and a bounding box.
UTM Converter — Convert between latitude/longitude and UTM coordinates (zone, hemisphere, easting, northing) on the WGS84 ellipsoid.
GeoJSON Bounding Box — Get the bounding box, centre, area and length of any GeoJSON, in both coordinate orders.