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 the share format for the non-developer side of geospatial work: Google Earth, My Maps, Garmin BaseCamp, most consumer drone apps. If a colleague asks you to drop a route into Google Earth so they can fly it, you need KML — and you usually only have GeoJSON. The translation is structurally clean for Placemarks, LineStrings, and Polygons.

Paste a Feature, FeatureCollection, or bare Geometry on the left. The converter wraps each feature in a <Placemark>, lifts properties into <ExtendedData>, and emits a single self-contained .kml document on the right. Download the file or paste the XML directly into Google Earth Pro's File → Open dialog.

Below the converter the body covers KML's style vocabulary (<Style>, <StyleMap>, icons), how altitude maps to KML's <altitudeMode>, and when to wrap the output in a KMZ for icon assets. For the reverse direction, use the KML to GeoJSON converter.

Watch out for: properties that contain HTML. Google Earth's default Placemark balloon renders description as HTML, which means an unsanitised property containing <script> or even broken tag soup can either render as raw text or hide your other properties entirely. This converter wraps each property in <![CDATA[…]]> so brackets are preserved literally, but if you rely on Google Earth's HTML rendering you'll want to set the description property explicitly with the markup you want.

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.

How the Conversion Works

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

Common Use Cases

  • 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.

Try It

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>
    <Placemark>
      <name>Eiffel Tower</name>
      <Point>
        <coordinates>2.2945,48.8584,0</coordinates>
      </Point>
    </Placemark>
  </Document>
</kml>

Notice that KML coordinates are comma-separated with no spaces and include an altitude value (0 when not specified). Feature properties such as name are mapped to the KML <name> element automatically.

How the Conversion Algorithm Works

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.