geojsonkit.org
GeoJSON utilities, in the browser
Say hi →

GeoJSON to KML

Paste GeoJSON, get KML 2.2 for Google Earth and Google Maps. Everything runs in your browser. Feature properties become <description>; features with a name property get a <name> tag.

GeoJSON to KML

updated 8 June 2026

Drop a .geojson file, or

What this tool does

It converts GeoJSON into KML 2.2 — the XML format Google Earth and Google My Maps read. Paste a FeatureCollection, a single Feature, or a bare geometry, click Convert, and each feature comes back as a <Placemark> ready to drop into a map.

The intent it closes: "I have GeoJSON, but the thing I need to open it in wants KML." A feature's name property becomes the label in the Google Earth sidebar; its remaining properties are written into the info balloon. Everything runs in your browser — your coordinates and attributes never leave your machine, which makes it safe for private mapping data. To go the other way, use KML to GeoJSON.

How this tool works

One click runs a parse-then-build pass, entirely in your browser.

1. Parse

Your text goes through the browser's JSON.parse. If it isn't valid JSON — a trailing comma, an unclosed bracket, a smart quote — the status bar shows JSON parse error. and the output pane is left untouched. A clean parse is the only requirement to proceed.

2. Collect the features

I normalize whatever you pasted into a list of features. A FeatureCollection hands over its features array; a single Feature becomes a one-item list; a bare geometry (a lone Point, Polygon, and so on) is wrapped in a feature with empty properties so it still produces a placemark.

3. Build each Placemark

For every feature I emit a <Placemark>. If properties.name exists, it becomes the <name> — the label Google Earth shows in its sidebar. The properties are then listed into a <description>, one key: value per line, so they appear in the info balloon when you click the feature. All text is XML-escaped, so an ampersand or angle bracket in a value can't break the markup.

4. Map the geometry

Each geometry maps to its KML counterpart: Point → <Point>, LineString → <LineString>, and Polygon → <Polygon> with an <outerBoundaryIs> ring plus an <innerBoundaryIs> for each hole. The multi- types (MultiPoint, MultiLineString, MultiPolygon) and a GeometryCollection are wrapped in a <MultiGeometry> holding their parts, with collections expanded recursively. Coordinates are written lng,lat; if a vertex carries a finite third value (elevation), it's preserved as lng,lat,elevation. The status bar reports Converted to KML. and Download saves the result as converted.kml (application/vnd.google-earth.kml+xml), ready for Google Earth.

Example

Input (GeoJSON Feature):

{
  "type": "Feature",
  "properties": { "name": "Basecamp", "elevation": "1200m" },
  "geometry": { "type": "Point", "coordinates": [-122.08, 37.38] }
}

Output (KML Placemark):

<Placemark>
  <name>Basecamp</name>
  <description>name: Basecamp
elevation: 1200m</description>
  <Point>
    <coordinates>-122.08,37.38</coordinates>
  </Point>
</Placemark>

Tips & common pitfalls

  • The name property drives the label. A property key named name becomes the <name> tag, which is what shows in the Google Earth sidebar. It also still appears inside the <description> list along with the other properties.
  • Coordinate order is [longitude, latitude]. If your points land in the wrong hemisphere, the source probably swapped them to [lat, lng]. Run it through the GeoJSON Validator to check the structure first.
  • Use WGS84 decimal degrees. KML assumes lon/lat in WGS84. Projected coordinates (UTM, State Plane) will appear in the wrong place — reproject before converting.
  • Holes are preserved. Polygon rings after the first are written as <innerBoundaryIs>, so doughnut shapes survive the conversion.
  • Big files stay in memory. There's no hard size cap, but because everything runs in the page, files past ~50 MB can feel sluggish on older machines.

Troubleshooting

The status bar says "JSON parse error." and the output is empty.

The input isn't valid JSON. Check for trailing commas, missing quotes around keys, smart quotes, or unclosed brackets. The GeoJSON Validator will point at the exact spot that breaks.

Google Earth shows nothing, or features land in the wrong place.

This is almost always coordinate order or projection. Confirm your GeoJSON is [longitude, latitude] in WGS84 decimal degrees; KML doesn't understand UTM or State Plane.

My polygon renders as a mess of triangles.

The ring is usually unclosed (the last coordinate must equal the first) or self-intersecting. Running it through Simplify GeoJSON often cleans up degenerate geometry before you convert.

FAQ

Does this support 3D coordinates (altitude)?

Yes. If a coordinate has a finite third value ([lng, lat, alt]), it's preserved in the KML <coordinates> string. Note that Google Earth defaults to "clamped to ground" unless you set the altitude mode yourself.

Can it preserve feature colors and styles?

No. This tool focuses on geometry and data — it doesn't emit KML <Style> blocks, so placemarks use Google Earth's default pin and line styling.

Is my data uploaded to a server?

Never. The conversion runs entirely in your browser's JavaScript engine; the data you paste stays in local memory and is gone when you close the tab. The page works offline once loaded.

Why KML instead of GeoJSON?

GeoJSON is the web standard, but KML remains the lingua franca for desktop GIS like Google Earth Pro, and it's the format Google My Maps and the Google Maps mobile app expect for custom layers.