More games at WuGames.ioSponsoredDiscover free browser games — play instantly, no download, no sign-up.Play

KML GPX GeoJSON Converter

Free KML to GeoJSON, GPX to GeoJSON & GeoJSON to KML converter. Convert GPS tracks, preview on a map, and get distance and elevation stats instantly.

clearClearpastePaste
Upload
Drag and drop KML, GPX, or GeoJSON file here
or click to browse

What is KML/GPX to GeoJSON Converter?

The KML/GPX to GeoJSON Converter is a free online tool that converts between GPS file formats: KML (Keyhole Markup Language), GPX (GPS Exchange Format), and GeoJSON. This enables seamless data exchange between Google Earth, GPS devices, GIS applications, and web mapping libraries.

KML is the format used by Google Earth and Google Maps for geographic data visualization. GPX is the standard format for GPS devices and fitness trackers. GeoJSON is the web-friendly format used by modern mapping libraries like Leaflet and Mapbox.

This converter preserves important metadata like waypoint names, track descriptions, elevation data, and styling information when converting between formats.

Supported Conversions

The converter supports these conversions:

  • KML → GeoJSON: Convert Google Earth placemarks to web-friendly GeoJSON
  • GPX → GeoJSON: Convert GPS tracks and waypoints to GeoJSON for web mapping
  • GeoJSON → KML: Export web map features to Google Earth
  • Track statistics: distance, elevation gain/loss, and bounding box for any converted track
  • Preserves waypoints, tracks, routes, and placemarks
  • Maintains properties, names, descriptions, and timestamps

How to Use KML/GPX Converter

Converting GPS files is simple:

  • Paste your KML, GPX, or GeoJSON data, or upload a file
  • The tool automatically detects the input format
  • Select the desired output format (or use auto-detect)
  • Choose options like preserving styles or including elevation
  • Click Convert to generate the output
  • Preview the result on a map or download the converted file

KML Format

KML (Keyhole Markup Language) is an XML-based format developed by Google for geographic visualization. Features include:

  • Placemarks: Points of interest with names, descriptions, icons
  • LineStrings: Paths and routes with styling
  • Polygons: Areas with fill colors and borders
  • Extended data: Custom properties and attributes
  • Styles: Colors, icons, line widths

KML files (.kml) can be opened directly in Google Earth and many GIS applications.

GPX Format

GPX (GPS Exchange Format) is the standard XML format for GPS data. Features include:

  • Waypoints: Individual points with coordinates and metadata
  • Tracks: Recorded GPS paths with timestamps and elevation
  • Routes: Planned paths with waypoints
  • Metadata: Creator, time, bounds information
  • Extensions: Custom data fields

GPX files (.gpx) are used by GPS devices, fitness trackers (Garmin, Strava), and mapping apps.

Applications and Use Cases

This converter is useful for:

  • Converting Google Earth KML to web-friendly GeoJSON
  • Importing GPS tracks from fitness apps into web maps
  • Exporting web map data to Google Earth or GPS devices
  • Converting hiking trails, running routes, or bike paths
  • Transforming survey data between different GIS formats
  • Preparing geographic data for various mapping platforms

Data Preservation

The converter preserves important data across formats:

  • Coordinates: Latitude, longitude, and elevation (if present)
  • Names and descriptions: Feature titles and detailed information
  • Timestamps: Time data from GPS tracks
  • Properties: Custom attributes and metadata
  • Styles: Colors, line widths, icons (where supported)
  • Structure: Waypoints, tracks, routes maintain their type

Some format-specific features may be adapted or simplified during conversion to ensure compatibility.

Frequently Asked Questions

The tool performs three one-way conversions: KML to GeoJSON, GPX to GeoJSON, and GeoJSON to KML. KML (Keyhole Markup Language) is Google Earth's native format, GPX (GPS Exchange Format from Topografix) is the GPS-device standard, and GeoJSON (RFC 7946) is the web-mapping standard. Auto-detect inspects your pasted or uploaded data and picks the right direction automatically. All three formats represent the same fundamental geometry types (Point, LineString, Polygon, and their Multi variants), so the coordinate conversion is lossless; only format-specific metadata such as KML styling is discarded when the target is GeoJSON, which has no native styling concept.

All three formats are required to store coordinates in WGS84 longitude-latitude (EPSG:4326). KML enforces this via its specification, GPX is locked to it because GPS satellites broadcast in WGS84, and GeoJSON (per RFC 7946) explicitly mandates it. Coordinates are decimal degrees with longitude (X) first and latitude (Y) second, optionally followed by elevation in metres. If your source data is in a projected CRS such as UTM, Web Mercator (EPSG:3857), or a national grid, reproject to WGS84 first using QGIS or GDAL ogr2ogr before importing here, otherwise the geometry will land in the wrong place by hundreds of kilometres.

Names and descriptions are preserved across all three formats, although the field naming differs: KML uses name and description, GPX uses name and desc, GeoJSON uses properties.name and properties.description by default. When converting KML to GeoJSON, KML styles such as line colour, polygon fill, and icon images are carried into the properties object (stroke, fill, marker-color), but GeoJSON has no native styling specification, so a strict GeoJSON reader may ignore them. GPX extensions such as heart rate, cadence, and power are preserved when converting GPX to GeoJSON inside the properties object.

KML files are read by Google Earth (desktop and mobile), Google Maps (My Maps), QGIS, ArcGIS Pro, Marble, OpenStreetMap iD editor, and many drone-mapping tools. GPX is supported by every consumer GPS device since 2005 (Garmin, Wahoo, Suunto), every running and cycling app (Strava, Komoot, AllTrails, MapMyRide), and most outdoor navigation apps (Gaia GPS, OsmAnd). GeoJSON is the universal format for web mapping: Leaflet, Mapbox GL, Google Maps API, OpenLayers, Cesium, deck.gl, Tableau, Power BI, and many R/Python data-science notebooks read it natively without any parsing setup.

Coordinates here are stored as decimal degrees. Each extra decimal place of latitude or longitude multiplies precision by ten: 5 decimal places (about 1.1 metres at the equator) is plenty for trail, cycling, and most survey work, and 6 places (about 0.11 metres) matches consumer-GPS accuracy. Going beyond 7 places adds digits that no GPS receiver can actually resolve, just inflating file size. The converter preserves whatever precision is in your source file rather than rounding it; the bounding box in the Track Statistics panel is shown to 5 decimals as a readable summary, not as a limit on the data.

After every conversion, the Track Statistics panel summarises the geometry. Total distance is the sum of great-circle (Haversine) segment lengths between consecutive points of every LineString, MultiLineString, and Polygon ring, using an Earth radius of 6,371 km, and is shown in both kilometres and miles. Elevation gain is the sum of all positive height changes between consecutive points and elevation loss the sum of the negative ones, taken from the optional third (Z) coordinate; both are reported in metres and feet alongside the minimum and maximum elevation. The panel also lists the total point count and the lon/lat bounding box. When a file carries no elevation values, the elevation rows are hidden automatically.

KML stores colours in ABGR order (alpha, blue, green, red) as hex, which is the opposite of the more common RGBA order used in HTML and CSS. A KML colour of 7fff0000 is RGB 0000ff (blue) with 50 percent alpha, not red as a naive reader might expect. When you author a colour by hand in GeoJSON properties (using the common RGBA hex order) and export to KML, remember to reverse the byte order so the colour renders correctly in Google Earth. This byte-order difference, not a bug in the conversion, is the usual reason a colour looks swapped after the round trip.

Yes, once the page is loaded. The converter is entirely client-side JavaScript running in your browser; there are no server-side calls during conversion. After your first visit, the browser caches all assets, and you can convert files offline indefinitely. This makes it useful in field-survey contexts where you record GPS data without cellular coverage and want to convert it to GeoJSON for upload later. The tool stores nothing about your files or location data; close the tab and everything is gone from memory. The privacy posture is verifiable with browser developer tools.
KML GPX GeoJSON Converter — Free KML to GeoJSON, GPX to GeoJSON & GeoJSON to KML converter. Convert GPS tracks, preview on a map, and get distance a
KML GPX GeoJSON Converter