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
| Feature | GeoJSON | KML |
|---|---|---|
| Format | JSON | XML |
| File size | Compact | Larger (XML overhead) |
| Styling | Not built-in | Built-in (colors, icons, labels) |
| 3D support | Limited | Full (altitude, camera angles) |
| Web mapping | Native support | Requires 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.