geojsonkit.org
GeoJSON utilities, in the browser
Say hi →

KML to GeoJSON

Paste KML or drop a .kml file, get GeoJSON. 100% in-browser — your file never leaves your device. The result is saved to your session so you can jump straight to the viewer or any other tool.

KML to GeoJSON

updated 25 April 2026

Drop a .kml file, or

Before you start

You need one of the following:

Note that KMZ files are not supported directly. KMZ is just a zipped folder containing a doc.kml file. If you have a KMZ, unzip it on your computer first and grab the KML file from inside.

Everything happens in your browser. There is no file size limit other than what your RAM can handle. For files over 50 MB, your browser might "stutter" during the XML parsing phase — just give it a few seconds to breathe.

How to use it

  1. Paste your KML code into the left pane, or drop a .kml file anywhere on the page.
  2. Click Convert to trigger the parser.
  3. Check the status bar at the bottom to see how many features were successfully extracted.
  4. Review the GeoJSON in the right pane. If it looks correct, click Copy or Download .geojson.
  5. Optionally, click the link in the intro to jump straight to the GeoJSON Viewer with your data loaded.

Example

Input (KML Placemark):

<Placemark>
  <name>Golden Gate</name>
  <Point>
    <coordinates>-122.478,37.819,0</coordinates>
  </Point>
</Placemark>

Output (GeoJSON Feature):

{
  "type": "Feature",
  "properties": { "name": "Golden Gate" },
  "geometry": {
    "type": "Point",
    "coordinates": [-122.478, 37.819, 0]
  }
}

Tips & common pitfalls

Troubleshooting

The output is empty or says "0 features".

This usually means the XML is malformed or uses an unsupported namespace. Ensure your KML starts with a valid <kml> tag and that you aren't trying to paste a KMZ file. Check the browser console (F12) for specific XML parsing errors.

My coordinates look backwards (lat/lng vs lng/lat).

KML and GeoJSON both use Longitude, Latitude order (per RFC 7946). If your source data was flipped, it will stay flipped here. Use a separate transformation tool if you need to swap axes.

The browser tab crashed on a large file.

Large XML files are memory-intensive to parse because the browser builds a full DOM tree. Try stripping out unnecessary <Style> blocks from the KML text before pasting to reduce the memory footprint.

Related tools

See also: if you need to do something adjacent on this site, try GeoJSON to KML to convert GeoJSON to KML for Google Earth, GeoJSON to CSV to flatten a feature collection into a CSV table, or GPX to GeoJSON to turn GPX tracks into GeoJSON.

Frequently asked questions

Does it support KMZ files?

Not directly. KMZ is a zipped archive. You need to unzip it and use the .kml file found inside (usually named doc.kml).

What happens to my KML folders?

GeoJSON is a flat list of features. Any <Folder> or <Document> structure in your KML is removed, though we sometimes keep the folder name as a property if the parser supports it.

Is my data private?

Yes. I don't run any server-side processing. Your KML is parsed locally in your browser's memory using JavaScript. Nothing is uploaded to a server.

Can I convert hundreds of files at once?

This UI is built for one-at-a-time use. For bulk conversion, I recommend using the togeojson CLI or ogr2ogr (part of the GDAL suite).

Are Z-values (altitude) supported?

Yes. If your <coordinates> tags include a third value for height, it is preserved in the resulting GeoJSON coordinate array.