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
Before you start
You need a GeoJSON file (.geojson or .json) or a snippet of text that follows the RFC 7946 standard.
This tool handles FeatureCollection, individual Feature objects, or raw Geometry types.
If your data has a properties object, I'll do my best to map those values to their KML equivalents so they show up in your map balloons.
Everything here happens 100% in your browser. Your coordinates and attributes are never uploaded to a server, which makes this safe for sensitive or private mapping data. There is no hard file size limit, but because the conversion happens in memory, files over 50 MB might feel sluggish on older machines.
How to use it
- Paste your GeoJSON into the left pane, or drop a
.geojsonfile directly onto the input area. - Click Convert to generate the KML 2.2 markup.
- Review the output in the right pane—you'll see your features wrapped in
<Placemark>tags. - Click Copy to grab the code, or Download .kml to save a file 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>elevation: 1200m</description>
<Point>
<coordinates>-122.08,37.38,0</coordinates>
</Point>
</Placemark>
Tips & common pitfalls
- The "name" property is special. If a feature has a property key named
"name", I map it directly to the KML<name>tag (the KML to GeoJSON tool handles the reverse). This is the label that appears in the Google Earth sidebar. - Property flattening. All other properties are serialized as a simple list inside the
<description>tag. This ensures your data is visible in the info balloon when you click a feature. - Coordinate Order. GeoJSON is
[Longitude, Latitude]. If your points are showing up in the wrong hemisphere, use the GeoJSON Validator to check if your source data accidentally swapped them to[Lat, Lng]. - Geometry Mapping.
Point→<Point>,LineString→<LineString>, andPolygon→<Polygon>. Multi-geometries are automatically wrapped in<MultiGeometry>blocks. - Winding Order. GeoJSON expects exterior rings to be counter-clockwise. KML is usually okay with either, but I preserve the holes using
<innerBoundaryIs>correctly.
Troubleshooting
The output pane is empty or says "Invalid JSON".
GeoJSON is strict. Check for trailing commas or missing quotes in your properties. If you're unsure, run your input through the GeoJSON Validator linked below to find the exact line causing the break.
The map in Google Earth is blank or features are in the wrong place.
This is almost always a coordinate order issue. Ensure your GeoJSON follows the [longitude, latitude] standard. Also, check that your coordinates are in WGS84 (decimal degrees), as KML doesn't support other projections like UTM or State Plane.
My polygons look like a "mess of triangles".
This happens if your GeoJSON ring isn't properly closed (the last coordinate must match the first) or if the winding order is corrupted. Try using the Simplify tool first, which often cleans up degenerate geometries during the process.
Related tools
See also: if you need to do something adjacent on this site, try KML to GeoJSON to turn KML into GeoJSON, GeoJSON to CSV to flatten a feature collection into a CSV table, or GPX to GeoJSON to turn GPX tracks into GeoJSON.
Frequently asked questions
Does this support 3D coordinates (altitude)?
Yes. If your GeoJSON coordinates have a third value (e.g., [lng, lat, alt]), it will be included in the KML <coordinates> string. Note that Google Earth usually defaults to "clamped to ground" unless you manually change the altitude mode.
Can I preserve feature colors and styles?
Standard GeoJSON doesn't officially support styling (though simplestyle-spec is common). This tool focuses on data and geometry; it doesn't currently generate KML <Style> blocks, so features will use the default Google Earth pin and line styles.
Does my data get uploaded to a server?
No. The conversion logic runs entirely in your browser's JavaScript engine. The data you paste stays in your local memory and is destroyed when you close the tab. You can even use this tool offline if the page is already loaded.
Why use KML instead of GeoJSON?
While GeoJSON is the standard for web development, KML remains the king for desktop GIS applications like Google Earth Pro and ArcGIS. KML is also often required for importing custom layers into the standard Google Maps mobile app.
Is there a command-line version for batch processing?
I don't have a CLI tool for this yet, but you can achieve the same result using ogr2ogr -f KML output.kml input.geojson (from the GDAL suite) or the togeojson Node.js library.