Skip to content

KML and KMZ to GeoJSON Converter

Convert supported KML or KMZ geometries to GeoJSON locally. Preview paths and preserved properties, with warnings for omitted KML features.

KML and KMZ to GeoJSON Converter

Convert KML placemarks into GeoJSON points, paths, polygons and geometry collections while retaining names, descriptions and ExtendedData values.

Maximum file size: 25 MB per file. You can also drag files here.

Supported scope and limitations

Network links are never followed. Styles, overlays, models and gx:Track timing are not converted. KMZ uses doc.kml when present, otherwise its first KML file. GeoJSON positions use longitude,latitude order; geometry topology is not repaired.

Examples contain invented demonstration data. Replace it before using any export.

Privacy: files are processed in your browser and are never uploaded.

Convert KML to GeoJSON when a web map or data workflow needs geographic features instead of a Google Earth-style document. The KML to GeoJSON converter reads supported placemarks from KML or one KML document inside a KMZ, then exports a GeoJSON FeatureCollection. Points, paths, polygons and supported geometry collections keep their coordinates, names, descriptions and simple ExtendedData values. Review the diagnostics before using the output: KML presentation features and linked resources are broader than the geometry subset converted here.

How to convert KML to GeoJSON

  1. Choose one .kml or .kmz file. For plain KML, you can paste its XML into the text input.
  2. Select Process files, or use Try an example for a small fictional placemark.
  3. Read the feature preview and any geometry or coordinate diagnostics.
  4. Download converted.geojson and inspect it in your intended mapping workflow.

There is no map service connection or address lookup. The KML to GeoJSON converter works with coordinates already in the file. Renaming a spreadsheet or a zipped collection of unrelated files to KML or KMZ will not create geographic data.

Supported geometries and placemark properties

KML Point becomes GeoJSON Point; LineString becomes LineString; Polygon becomes Polygon with an outer ring and any inner rings. MultiGeometry becomes a GeometryCollection of supported child shapes. A placemark produces a feature with a properties object containing its name, description and simple named Data values.

Icons, colors, camera views and other display instructions are not copied into a map style. Image overlays, 3D models and gx:Track timing are also outside the conversion profile. An omitted shape may leave a feature with null geometry, so inspect warnings and compare the feature count with your original document. At least one supported geometry is needed to produce a useful result.

Example: a studio point with altitude

The built-in example contains:

<Placemark>
  <name>Studio</name>
  <Point><coordinates>-122.4,37.8,10</coordinates></Point>
</Placemark>

Inside a complete KML document, that placemark becomes a feature named Studio with Point coordinates [-122.4,37.8,10]. The first value is longitude, the second is latitude, and the third is the optional altitude. The example does not reverse latitude and longitude to match the way a human might write a location.

Before importing a real route, check one known point against its expected position. Swapped axes can place data in the wrong location while still looking like plausible numbers.

KML to GeoJSON example result preview
Illustrative result from this KML to GeoJSON converter using a fictional test file.

KMZ archives and linked geographic data

A KMZ is a ZIP-based package, which may contain a KML document and additional assets. This KML to GeoJSON converter prefers doc.kml when present; otherwise it reads the first KML file found in the archive. It does not merge several KML documents from one KMZ or offer an archive-document selection interface.

NetworkLink elements are not followed. That prevents the KML to GeoJSON converter from fetching linked geographic datasets and also means a document composed mainly of network links may have little usable local geometry. Export the required geometry as an actual KML document from its source when possible. Archive safety limits apply in addition to the displayed file-size limit.

Coordinate checks are different from topology repair

Positions must contain finite numbers within supported longitude and latitude bounds. The converter also performs basic GeoJSON checks such as line length and polygon ring closure. These checks can reveal malformed geometry but do not repair a self-intersection, prove a polygon’s boundary is correct or decide whether an altitude uses the intended vertical reference.

Use the GeoJSON validator for a separate inspection of a GeoJSON file after other edits. For a damaged GPX track, the GPX repair tool handles a different format and a limited cleanup profile. A file extension change cannot replace an actual format conversion.

Troubleshooting missing shapes and invalid XML

Malformed XML, a missing KML root, invalid coordinate values or an archive without a KML document stops meaningful conversion. Correct the source export before retrying. If the output contains fewer usable shapes than expected, inspect warnings for unsupported geometry rather than assuming every placemark was a convertible point or polygon.

Descriptions may contain markup as data; the converter does not execute that markup. Review descriptive properties before feeding them into another application that might render HTML. Keep a copy of the original KML because styled annotations and presentation settings cannot be recreated from this GeoJSON subset alone.

Using the result in a geographic workflow

The downloadable FeatureCollection is suitable for testing in applications that accept ordinary GeoJSON, but the receiving application may impose its own geometry, coordinate or feature-count requirements. This converter does not perform a live import into every GIS package. Google’s KML reference explains the source geometry and coordinate conventions when you need to inspect an unfamiliar placemark.

If your source is a fitness recording rather than KML, the FIT to GPX activity converter extracts a supported route subset. Choose the route format your destination actually supports, and preserve the original whenever elevation, styling or advanced metadata is important.

Common KML to GeoJSON converter errors and how to fix them

When the KML to GeoJSON converter cannot use a file, it stops with one clear message instead of producing a half-finished download. These are the problems people run into most often, with the fix for each:

  • A GPS coordinate or elevation is invalid. A coordinate is missing, not numeric, or outside longitude ±180 / latitude ±90. KML lists longitude first.
  • The file does not match the expected format or has invalid structure. The root element is not kml, or the XML is malformed. A KMZ archive must be unzipped first.
  • The file is empty or has no usable records for this tool. No placemark contains a supported geometry.
  • Warnings about network links or unsupported geometry Linked files are not fetched and models are omitted; both are listed in the report.

Privacy: the KML to GeoJSON converter runs in your browser

KML to GeoJSON converter processing happens with JavaScript in a background worker on this page. Your file is not uploaded to a FileFix server, and the results you download are created in your browser’s memory. Activity and location files reveal where you live, train and travel, so they are worth keeping on your own device. When you finish on a shared computer, clear the selection or close the tab.

For the underlying format rules, see the OGC KML standard and RFC 7946 (GeoJSON). The KML to GeoJSON converter follows the subset described on this page rather than every optional feature in those documents.

Got a zipped KMZ file? Pull out the KML with the KMZ to KML extractor. To open a GPS track in Google Earth, use the GPX to KML converter.

Sources

Questions about this tool

Can I convert a KMZ file?

Yes. The tool reads doc.kml when present, otherwise the first KML document in the archive. It does not merge every KML file in a KMZ.

Are longitude and latitude swapped?

No. GeoJSON positions retain longitude first, latitude second, followed by optional altitude.

Will icons and line colors transfer?

No. KML styling, overlays and viewpoints are outside this geometry conversion profile.

Does the converter follow KML NetworkLinks?

No. Linked resources are not requested. Geometry must be present in the selected local document.

Does a clean report prove polygons are topologically valid?

No. Basic coordinate and structure checks do not detect or repair every self-intersection or boundary problem.

Review the supported formats and limitations before using an output file. File processing happens in your browser.