GpsField Logo
GpsField
GIS Tools8 min read

KML to GeoJSON Converter: Fast, Accurate Guide

Convert KML to GeoJSON in your browser with GpsField’s free tool. Step‑by‑step instructions, KMZ workaround, and pro tips for clean, web‑ready data.

G

GpsField

Field GIS Specialist · 8 min read

Field technician converting KML to GeoJSON on a tablet beside a farm boundary map

KML to GeoJSON Converter: Fast, Accurate Guide

If you need a fast, accurate KML to GeoJSON converter you can use online for free, GpsField’s KML → GeoJSON tool gets it done in the browser with no install. Drop a .kml from Google Earth, preview the features and attributes, and download clean GeoJSON ready for Leaflet, Mapbox, QGIS, or your web app. The steps below cover KML, a simple KMZ workaround, how attributes map over, and fixes for invalid polygons and large jobs.

Why convert KML to GeoJSON (and when to go the other way)

  • KML is Google Earth–friendly and widely used for sharing boundaries and points between colleagues. GeoJSON is the native language for most web maps and modern GIS workflows (Leaflet, Mapbox, many APIs).
  • Typical jobs: sharing a farm boundary on a web map, moving survey control or alignment lines into GIS, or exporting construction haul-road routes to the field team.
  • Both formats use WGS‑84 (EPSG:4326) coordinates by default. That makes round-tripping straightforward in GPS-based workflows. For web mapping, GeoJSON is generally lighter and easier to style in code, while KML carries more built‑in styling and folder structures for Google Earth.

Illustration comparing the same field boundary in KML and GeoJSON formats

Convert KML to GeoJSON in GpsField (step‑by‑step)

  1. Open the KML → GeoJSON converter at https://gpsfield.com/tools/kml-geojson.

  2. Drag your file onto “Drop a KML file here (.kml only)” or click “Choose KML” and pick the file from disk.

  3. Use the “Preview” panel to confirm the features and their attributes (names, IDs, parcel notes, etc.).

[[ SCREENSHOT ]]

  1. Click “Convert to GeoJSON” to download a .geojson file you can use in web maps, GIS, or the GpsField workspace.

Tips:

  • It runs directly in your browser—quick, private, and no install.
  • The resulting .geojson is standard JSON; open it in the GeoJSON Spatial Viewer to inspect and validate.
  • For large files, look for a preview before export, in‑browser processing for privacy, and preservation of attributes. GpsField supports these and also lets you break work into smaller chunks.

Field example: 128‑acre pivot boundary

A center‑pivot boundary traced in Google Earth as KML often converts to a single Polygon in GeoJSON. If you excluded non‑irrigated corners or created interior cutouts, it may convert as a MultiPolygon. Example numbers:

  • Area: 51.82 ha = 128.05 ac (1 ha = 2.47105381 ac).
  • After conversion, load the GeoJSON into the Free map workspace (no signup) to check acreage, perimeter, or to split into management zones later.

Construction example: haul road centerline with waypoints

A haul road drawn as a KML LineString (3.4 km) plus point Placemarks for waypoints converts to:

  • A GeoJSON LineString with the same vertices and length when measured on a map that uses geodesic math.
  • A FeatureCollection containing both the line and the points, so you can style and filter them separately in web maps or GIS.

Real examples with numbers you handle every day

  • Agriculture: A 51.82 ha (128.05 ac) pivot boundary KML becomes GeoJSON ready for web maps and agronomy tools. If you later split it into variable-rate zones, each zone remains a clean Polygon or MultiPolygon feature with properties carried over.
  • Survey/GIS: A 3.4 km right‑of‑way alignment (KML LineString) converts to GeoJSON for checks against design, stakeout planning, or for plotting a slope profile using the Elevation Profile Viewer.
  • Real estate: A 9‑parcel farm drawn as 9 KML polygon Placemarks becomes a single GeoJSON FeatureCollection. Parcel IDs, owner names, or acreage stored in ExtendedData map into properties on each feature.

KMZ files: quick workaround

  • KMZ is a zipped KML. To convert KMZ to GeoJSON without installing software, rename file.kmz to file.zip and extract doc.kml from it.
  • Then use KML → GeoJSON as above.
  • Note on styling: geometry and attributes convert; referenced style icons and images don’t carry over to plain GeoJSON. Add your own styles in your web map or GIS.

Convert GeoJSON back to KML for Google Earth

When you need to convert GeoJSON to KML for Google Earth users, use GeoJSON → KML. It’s ideal for round-tripping:

  • Send staked points, as‑built lines, or adjusted parcel polygons back to teams that prefer KML in Google Earth.
  • If needed, validate or restyle layers first in the GeoJSON Spatial Viewer.
  • Have plain JSON? Ensure it’s valid GeoJSON before using a converter. If it’s not GeoJSON, convert or wrap it to valid GeoJSON geometry first.

Preserving attributes, geometry, and styling

  • Attributes: KML name, description, and ExtendedData map to GeoJSON properties on each feature.
  • Geometry: Points, LineStrings, Polygons, MultiPolygons, MultiLineStrings, and MultiPoints convert 1:1, keeping the same coordinate arrays.
  • Styling: KML styles and icons don’t carry into plain GeoJSON. Apply symbolization in your mapping library or GIS.
  • 3D/other constructs: Altitude (3D), NetworkLinks, and GroundOverlays aren’t represented in basic GeoJSON geometry. Only the vector features (points, lines, polygons) are converted.

Troubleshooting bad or complex KML

  • Invalid rings or self‑intersections: If you see odd holes, spikes, or union issues after import, clean geometry in your GIS or re‑trace carefully. You can also simplify then re‑buffer to fix winding issues—this practical sequence often resolves invalid polygons.
  • Mixed geometry in one folder: The converter returns a single FeatureCollection containing multiple geometry types. Filter later by geometry type if your workflow expects one type per layer.
  • Wrong CRS suspicion: KML is always EPSG:4326 (longitude, latitude). If your source data wasn’t in WGS‑84 before export to KML, reproject it first. Use EPSG / CRS Lookup to confirm codes and bounds.
  • Large files: If preview feels slow, split the KML into logical chunks (e.g., parcels by township) and convert in parts. You can also simplify lines/polygons in your GIS before export. When comparing tools, prioritize stability with big geometries, attribute preservation, and an in‑browser workflow.

Engineer reviewing converted GeoJSON haul road alignment on a tablet at a site

Related file workflows you’ll likely need

FAQ: KML vs GeoJSON for field operations

  • Which is lighter for web maps? GeoJSON is usually lighter and friendlier to HTTP APIs and JavaScript libraries, especially if you simplify geometries. KML can include styles and foldering useful for Earth, but it’s verbose for web apps.
  • Will area and length change after conversion? Coordinates are unchanged in a correct conversion. Any area/length differences you see are down to how your receiving map calculates distances (geodesic vs. planar) and projection display, not the KML vs. GeoJSON format itself.
  • Can I draw or measure after converting? Yes. Drop the resulting GeoJSON onto the Free map workspace (no signup) to measure acreage (ha/ac), perimeter, or route distances. Export again if you need another format.

Next step: put your converted data to work

Frequently asked questions

How do I convert KMZ to GeoJSON if the tool only accepts KML?

KMZ is a zipped KML. Rename your file from .kmz to .zip, extract the contents, and locate doc.kml. Then upload that KML to the KML → GeoJSON tool and convert. This avoids installing extra software and preserves your features and attributes.

Does KML to GeoJSON conversion keep names, IDs, and parcel attributes?

Yes. KML name, description, and ExtendedData fields map into GeoJSON properties on each feature. After conversion, open the file in a GIS or the GeoJSON Spatial Viewer to verify your attribute columns before sharing.

Why do my colors and icons disappear after converting KML to GeoJSON?

GeoJSON stores geometry and properties but not KML‑specific styles or icon images. After conversion, apply your desired symbology in your web map (e.g., Leaflet/Mapbox) or GIS. The underlying coordinates and attributes remain intact.

How can I validate and fix invalid polygons before or after conversion?

Validate the output in the GeoJSON Spatial Viewer and inspect for self‑intersections or holes. If a polygon is invalid, clean geometry in your GIS (remove spikes, fix ring order, simplify then re‑buffer) and re‑export to KML, then reconvert to GeoJSON. For stubborn files, split layers into smaller chunks and convert separately. This mirrors the common fix workflow used in most GIS packages.

Ready to convert your KML right now? Open the browser-based KML → GeoJSON tool, drop your file, preview, and download clean GeoJSON for your next field or site job.

Tags & Topics

GisKmlGeojsonSurveyingMapping