KML Converter
This tool converts KML files (the XML format used by Google Earth) into GeoJSON, the open standard used by most web-mapping tools. Upload a .kml file and you get a live map preview of every converted Point, LineString and Polygon, plus a one-click GeoJSON download.
The conversion happens entirely in your browser — the file is never uploaded to a server. Only geometry and placemark names are carried over: KML styling, icons, descriptions and embedded media are not converted, and nested MultiGeometry elements are flattened into individual features.
How to use this tool
Click Upload .kml file and choose a KML document from your device. It is read locally by your browser.
The tool parses every Placemark, converts Points, LineStrings and Polygons to GeoJSON features, and draws them on the map with a count of each geometry type.
Click Download GeoJSON to save the converted FeatureCollection to your device for use in QGIS, Leaflet, Mapbox or any other GeoJSON consumer.
What people use this tool for
Placemarks drawn in Google Earth can be converted here into GeoJSON ready for Leaflet or Mapbox GL without installing desktop software.
GeoJSON imports cleanly into QGIS, PostGIS (ST_GeomFromGeoJSON) and most spatial databases, making this a quick bridge from KML.
The per-type counts and map preview reveal whether a KML contains the geometry you expect before you commit to a larger workflow.
How it's calculated
The file is read as text and parsed with DOMParser as XML. Every Placemark element is inspected (namespace-aware), its name is kept as a feature property, and Point, LineString and Polygon children are extracted. KML coordinates are lng,lat[,altitude] and are flipped to GeoJSON's [lng, lat] order. Polygon outer rings become Polygon coordinates. The resulting FeatureCollection is rendered with Leaflet's L.geoJSON and offered as a Blob download. No data leaves the browser.
Related tools and resources
Frequently asked questions
Is my KML file uploaded anywhere?
No. The file is read and parsed entirely in your browser using the DOMParser API. The conversion and the GeoJSON download are generated locally.
Are KML styles, icons and descriptions preserved?
No. Only geometry and the placemark name are converted. KML styling, custom icons, HTML descriptions and embedded images are dropped because GeoJSON has no standard way to carry them.
What if my KML has folders or MultiGeometry?
Folders are fine — every Placemark inside them is converted. Placemarks with multiple geometries produce one GeoJSON feature per geometry rather than a single multi-part feature.
Why did I get 'no readable coordinates'?
Placemarks were found but none contained parseable Point, LineString or Polygon coordinates — for example a KML with only GroundOverlays or network links. This tool converts vector geometry only.
Data sources & methodology
- OpenStreetMap — Base map tiles.
- Leaflet — Interactive map rendering library.