Live Online ConverterChannel: geojsonkml

GeoJSON to KML Converter

Convert a GeoJSON file into a KML file.

Ensure quick compatibility with Google Earth and global spatial programs by converting standard, flat GeoJSON structures into XML-based KML documents. Perfect for displaying boundary lines and placemarks.

Drag file here to convert, or select file

Supported file extension: .geojson, .json • Max 50MB

Channel: Direct Stream ModeGDAL Driver Operational

Specification Rules

  • Convert programmatic geo layers into visual Google Earth overlays
  • Share custom regional boundaries with external clients who only use Google Maps
  • Integrate automated GIS workflows directly into traditional visual mapping software
  • Complex nested arrays of metadata flat-map to basic HTML tables
  • Output KML coordinates default to standard coordinate settings (EPSG:4326)
  • Strict file size ceilings apply to avoid browser visualization lag

GDAL Direct Equivalent Terminal Command

sh — gdalready
$ogr2ogr -f KML output.kml input.geojson

When to use this conversion

Convert when you need to deliver data to a recipient who will open it in Google Earth, Google My Maps, or a tool that only reads KML. KML carries styling inline, so it is also the right choice when you need to bake colours and icons into the file itself.

Technical Details

GDAL writes a KML 2.2 document with one Placemark per GeoJSON Feature. Geometries are translated from GeoJSON arrays to KML's lon,lat,alt comma-separated triplets, with the coordinate system fixed to WGS 84 (KML's only legal CRS). Feature properties become an HTML <description> table; the "name" property (if present) populates the KML <name> element. No styling is generated by default — apply styles via a <Style> block written manually or via a KML editor.
Output file size

KML is typically 1.5–2× the size of the source GeoJSON because XML overhead inflates every coordinate and tag pair. KMZ (zipped KML) compresses back to roughly 30–40% of the GeoJSON size.

Common Errors & Fixes

  • Property values containing HTML special characters break the description balloon: < and & must be entity-encoded. Fix: use the LIBKML driver (-f LIBKML) which handles escaping automatically.
  • Coordinate precision excessive: KML defaults to many decimal places, inflating size. Fix: round coordinates in the source GeoJSON to 6 decimal places before conversion.
  • Output lacks styling and renders as default yellow pushpins: KML requires explicit <Style> blocks. Fix: post-process to inject <Style> elements, or use a templating step.
  • Source CRS not WGS 84: KML strictly requires lat/lon; conversion silently treats projected coordinates as lat/lon. Fix: reproject to EPSG:4326 first.

Alternative Tools

  • QGIS: open the .geojson, Export → Save Features As → KML
  • ogr2ogr CLI: ogr2ogr -f KML output.kml input.geojson
  • tokml (npm package, Mapbox/Felt) for JavaScript pipelines
  • Manual: hand-write a KML wrapper around generated <coordinates> blocks for full styling control

Frequently Asked Questions

Will Google Earth display my feature properties?

Yes. GDAL writes all non-geometry feature parameters into a standard HTML table in the description tag, which displays dynamically when you click each placemark search pin.

Does this support multi-polygons?

Yes. KML fully supports MultiGeometry boundaries, allowing multi-polygon features to map and render precisely.

Are spatial reference system properties adjusted?

Yes. KML strictly requires WGS84 coordinates. Our script implicitly guarantees standard spherical mappings as part of the conversion.

Related Transformations Map