Convert GeoJSON to KML

This converter turns a GeoJSON file into KML for Google Earth and Google My Maps, keeping every property as placemark data and letting you choose the name field. The conversion runs in your browser, so your file is not uploaded. Colors from geojson.io (marker-color, stroke, fill) become KML styles, nested values are written as JSON text, and the result is plain KML, not KMZ.

Did a file not convert correctly? E-mail [email protected], ideally with a small sample file, and it will be fixed.

Key facts

GeoJSON to KML: why convert

Data from web maps, APIs, geojson.io or your own scripts is usually GeoJSON, while Google Earth and Google My Maps work best with KML. This converter turns a GeoJSON file into a KML file you can open in Google Earth or import into My Maps. Every property is kept as placemark data, and you choose which one becomes the placemark name. Both formats use WGS84 longitude and latitude, so the coordinates are not changed. Points, lines and polygons can stay together in one file, because KML, like GeoJSON, allows mixed geometries. The conversion runs in your browser with GDAL, and your file stays on your computer.

How to convert GeoJSON to KML

  1. Drop your .geojson or .json file in the box, or click to choose it.
  2. Choose the property to use for placemark names, or keep Automatic.
  3. Click Convert to KML and open the file in Google Earth or import it into My Maps.

What changes when you convert

Colors from geojson.io become KML styles

Tools such as geojson.io and Mapbox store colors as properties like marker-color, stroke and fill, following the simplestyle convention. The converter turns them into a KML style on each placemark: points get a white pushpin tinted with marker-color (marker-size sets its size), lines get the stroke color, width and opacity, and polygons also get the fill color with fill-opacity. Missing values use the simplestyle defaults, such as a fill opacity of 0.6. Maki icons from marker-symbol are not carried over, and features without color properties keep the standard pushpin or a red outline without fill. The properties are also kept as data fields.

Names and descriptions

A property called name becomes the placemark name automatically; otherwise a property with name, title or label in it is used, and you can choose any other. A property called description becomes the balloon text, and HTML in it is shown as formatted text in Google Earth.

Nested values and dates

KML data fields are flat. Nested objects and arrays are written as JSON text, which Google Earth shows as it is. Dates and times are kept exactly as they are written in the GeoJSON.

Altitude

A third coordinate is kept as altitude. Google Earth draws features on the ground until you change the altitude mode in the placemark properties.

GeoJSON in other coordinate systems

Files written before RFC 7946 sometimes declare a national grid or another system in a "crs" member. The converter honors it and reprojects to WGS84, since KML has no other option. A file without "crs" whose coordinates are clearly not degrees (meters from a projected QGIS project, for example) is not taken as WGS84: the page asks for its coordinate system and suggests the ones that fit.

About the formats

GeoJSON

GeoJSON is a plain-text JSON format for geographic features, standardized as RFC 7946 in 2016. It is the native format of web maps such as Leaflet, MapLibre and Mapbox, and of many APIs.

  • Coordinates are WGS84 longitude, latitude (in that order).
  • Points, lines and polygons can be mixed in one file.
  • Properties can be any JSON value, with no limit on field name length.

KML

KML (Keyhole Markup Language) is the XML format behind Google Earth and Google My Maps, and an OGC standard since 2008. Besides geometry it can hold styles, icons, folders and descriptions in HTML.

  • Always WGS84 longitude, latitude and optional altitude.
  • Folders group placemarks; each folder can become its own layer when converting.
  • Styles (colors, line widths, icons) are specific to KML and Google Earth.

Frequently asked questions

Will the KML open in Google My Maps?

Yes. Add a layer in My Maps, click Import and choose the file. The placemark name becomes the title, and the other properties appear in the details.

Why are all my features in one folder?

A GeoJSON file is one layer, so it becomes one KML folder named after the file. Mixed points, lines and polygons can share that folder in KML.

Can I get a KMZ instead?

Yes. This page writes plain KML, which Google Earth and My Maps open directly. For a smaller file to send or upload, use the GeoJSON to KMZ converter, which writes the same KML packed as doc.kml in a KMZ.

Is my GeoJSON uploaded?

No. Your browser converts the file on your own device, and nothing is sent anywhere.