Convert a file
Home › KML & KMZ converter › GeoJSON to KML
GEOJSONKML

GeoJSON to KML converter

Most people cannot open a raw GeoJSON file, but almost everyone can open Google Earth. This GeoJSON to KML converter turns API or web-map output into placemarks, paths and polygons a colleague can double-click, with no coding involved.

Nothing uploadedGDAL engineReviewed

Drop a file, or click to browse

KML, KMZ, SHP (.zip), GeoJSON, GPKG, GML, GPX, DXF, CSV, Excel, and more

Nothing uploadedGDAL engineWorks offlineNo account

No GeoJSON file to hand? Download a sample GeoJSON file (100 points) and drop it above to see the conversion.

How to convert GeoJSON to KML

  1. Drop the GeoJSON file, whether it holds a FeatureCollection or a single feature.
  2. Give the layer a quick sanity check on the preview map.
  3. Choose KML and convert; features arrive as placemarks with their properties in the balloon.

What changes when you convert GeoJSON to KML

WhatGeoJSON → KML
GeometryKeptPoints, lines and polygons are preserved exactly, including multi-part shapes.
AttributesKeptEvery column and full field name moves from GeoJSON into KML untouched.
Styling & labelsChangesKML supports styling; features are written with clean default styling and a name label you can restyle in Google Earth.
Coordinate systemKeptBoth formats are fixed to WGS84 longitude/latitude (EPSG:4326), so the coordinates are copied across without any reprojection.
Elevation (Z)Kept3D Z values carry from GeoJSON into KML wherever the source records them.
File structureKeptA single, self-contained .kml file you can move around on its own.

Why convert GeoJSON to KML?

GeoJSON is the working language of modern web maps, moving features through Leaflet, Mapbox GL, OpenLayers and APIs as plain JSON text, but it stays a developer format at heart. KML is what everyone else can open: Google Earth and Google Maps read it, so points, lines and polygons display with labels straight away, and boundaries or field points can be handed off without anyone writing code.

Coordinate system handling

On the input side there is nothing to configure, because RFC 7946 admits exactly one reference system, WGS84 with longitude leading. Files from before 2016 sometimes carry a crs member naming a projected system; current readers ignore that member by design, which makes reprojecting such a file to plain degrees a job for QGIS or ogr2ogr before it reaches the tab.

KML holds the same datum, so the placemark coordinates are character for character the feature coordinates. One display quirk is worth knowing: Google Earth quotes latitude ahead of longitude on screen, while the converted file keeps the longitude-first order both formats are written in.

What to check when converting GeoJSON to KML

Two things in the GeoJSON are worth checking before you convert. Give each feature a sensible name property, because that value becomes the placemark label and bare labels make a layer hard to read. Flatten nested properties where you can, since KML shows attributes as balloon text rather than a tidy table, and nested objects can read awkwardly in Google Earth.

Troubleshooting GeoJSON to KML

  • Points mirror into the wrong part of the world. Hand-assembled files often list latitude first, while the specification wants longitude leading, which is how Nairobi ends up in the ocean south of India. Swap every position pair in the source, not only the first one checked, and convert again.
  • A valid file converts to a layer with nothing in it. A FeatureCollection whose features array is empty is perfectly legal JSON, and APIs return exactly that when a query matches nothing. The conversion did its job; widen the bounding box or repair the filter that produced the file.
  • Fewer placemarks than features, with no error shown. Features whose geometry is null are allowed by the specification and turn up regularly in API exports, and a placemark cannot exist without a position. Count the null geometries with a one-line jq or Python check, and decide upstream what location those records deserve.
  • Date properties do not drive the Google Earth time slider. A property named date is plain text to KML, since the time slider reads TimeStamp and TimeSpan elements that GeoJSON has no way to express. Add those elements to the converted document with a script or text editor when animation is the goal.
  • A cluster of placemarks stacks at zero-zero in the Gulf of Guinea. Failed geocoding upstream writes [0, 0] positions that are perfectly valid JSON, and every such feature converts into a placemark floating off the African coast. Filter the zero pairs out before converting, or fix the addresses that never resolved, since the converter has no way to know which origin points are genuine.

About the formats

GeoJSON is where web maps keep their data, whether it arrives as a Leaflet or Mapbox GL layer, an API response, or a feature you edited in the browser. KML is where that same data goes to be seen in Google Earth. The conversion takes features built for a slippy web map and rewrites them as placemarks, paths and polygons that Earth can draw over imagery. It is the handoff from a developer's dataset to a viewer anyone can open.

Frequently asked questions

Why was my file rejected or read as empty?

GeoJSON has to be valid JSON: a FeatureCollection, a single Feature or a bare geometry. A trailing comma, a byte-order mark or a file saved as rich text stops the parser before any feature is read.

Can a mixed FeatureCollection convert to KML in one pass?

Yes. KML does not force one geometry type per file the way a shapefile does, so points, lines and polygons stay together in one document.

Can I get my Leaflet colors into Google Earth?

Not automatically. GeoJSON carries no Google Earth styling, because colors in a web map live in code rather than in the data. Restyle the layer in Google Earth, or set Style elements in the KML afterwards.

What happens to my GeoJSON feature properties in the KML?

Each feature's properties become ExtendedData attached to its placemark, and Google Earth shows the key and value pairs in the balloon when you click it. Values arrive as text rather than typed fields.

Is Google Earth the right destination for a very large export?

Earth parses the entire document when it opens, so a dense national polygon layer that runs to tens of megabytes loads slowly and pans worse. Thin the geometry with mapshaper or a bounding-box filter before converting, and keep the full-resolution GeoJSON for the code that actually needs every vertex.

What does a single feature look like once it is KML?

A point feature carrying name and status properties becomes a Placemark whose name element holds the label and whose coordinates repeat the longitude and latitude digit for digit. The remaining properties travel into ExtendedData, which is the table Google Earth prints in the balloon when the point is clicked.

Related converters

Ready to convert?

Drop a file and download the result in seconds. Nothing is uploaded, nothing is stored.