Skip to content

GeoJSON to KML Converter

Convert GeoJSON files to KML format for use in Google Earth and other mapping applications.

Skip to the tool

KML is what Google Earth, Google My Maps and a long tail of GIS desktop software still expect. The geometry model maps across cleanly, so the conversion is mostly mechanical.

Each feature becomes a Placemark. A name or title property becomes the Placemark name and description becomes its description. Every other property is written as typed ExtendedData, which is what keeps your attribute table intact on the other side. Multi-geometries become a MultiGeometry block.

Two things do not survive: KML styling has no GeoJSON equivalent to carry over, and elevation values in a third coordinate position are written but ignored by most viewers unless you also set an altitude mode.

What Is KML?

KML (Keyhole Markup Language) is an XML-based format for geographic data originally developed for Google Earth. It is widely used for sharing map data with Google Earth, Google Maps, and other mapping applications that support the OGC KML standard.

Mapping Features Onto Placemarks

Paste your GeoJSON and the tool converts it to valid KML. Each GeoJSON Feature becomes a KML Placemark. Geometry types are mapped directly: Point to Point, LineString to LineString, Polygon to Polygon. Feature properties are included as ExtendedData elements in the KML output.

Note that GeoJSON uses [longitude, latitude] coordinate order while KML uses longitude,latitude (comma-separated, no space). The converter handles this automatically.

GeoJSON vs. KML

FeatureGeoJSONKML
FormatJSONXML
File sizeCompactLarger (XML overhead)
StylingNot built-inBuilt-in (colors, icons, labels)
3D supportLimitedFull (altitude, camera angles)
Web mappingNative supportRequires parsing

Who Still Asks for KML

  • Sharing geographic data with Google Earth users
  • Importing web mapping data into Google My Maps
  • Distributing map data to stakeholders who use KML-based tools
  • Archiving spatial data in an OGC-standard XML format

To convert in the other direction, use the KML to GeoJSON converter.

The Eiffel Tower as a Placemark

Paste this GeoJSON Point feature into the converter. The tool produces a KML Placemark with the same location and name:

GeoJSON{
  "type": "Feature",
  "properties": { "name": "Eiffel Tower" },
  "geometry": {
    "type": "Point",
    "coordinates": [2.2945, 48.8584]
  }
}

The resulting KML output:

KML<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2">
<Document>
  <name>GeoJSON Export</name>
  <Placemark>
    <name>Eiffel Tower</name>
    <Point>
      <coordinates>2.2945,48.8584</coordinates>
    </Point>
  </Placemark>
</Document>
</kml>

KML coordinates are comma-separated with no spaces inside a triple. Two-dimensional GeoJSON positions are written as two values; an altitude appears only when your input carries a third ordinate. A name property becomes the KML <name> element, and the Document takes a fixed name of GeoJSON Export.

Inside the KML Writer

The converter walks the GeoJSON structure and maps each Feature to a KML Placemark inside a Document element. Coordinate arrays are reformatted from JSON arrays [lon, lat] to KML's lon,lat,alt string format. Properties named name or description are mapped to their native KML elements; all other properties are written as <ExtendedData> entries.

For background on how KML compares to GeoJSON and when each format is the right choice, see the GeoJSON Specification Guide. If you need to share your data with Google Earth, the Web Mapping Guide covers integration options.