KML GPX GeoJSON Converter

Free online KML, GPX to GeoJSON converter. Convert GPS tracks, waypoints, routes between KML, GPX, and GeoJSON formats with style preservation.

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 bidirectional conversion between:

  • 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
  • GeoJSON → GPX: Create GPS files from web map data (future)
  • 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 converts in any direction between KML (Keyhole Markup Language, Google Earth's native format), GPX (GPS Exchange Format from Topografix), and GeoJSON (RFC 7946). KMZ archives (zipped KML) are also accepted as input; the tool unzips them, picks the doc.kml inside, and processes the geometry. Output can be a flat KML or a KMZ archive when you have many images or styles. All three formats represent the same fundamental geometry types (Point, LineString, Polygon), so conversion is lossless for coordinates; only format-specific metadata such as KML styling may need to be discarded when targeting GeoJSON.

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. KML styles (line colour, polygon fill, icon images) are preserved when going KML to KML or KML to KMZ, but are discarded when going to GeoJSON because GeoJSON has no native styling concept. GPX extensions (heart rate, cadence, power) are preserved going GPX to GeoJSON inside the properties object but cannot round-trip back to KML cleanly because KML lacks equivalent fields.

KML and KMZ 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.

ISO 3166-1 is the international standard that assigns codes to countries and dependent territories. Alpha-2 codes are two-letter (US, GB, VN, BR, FR, DE) and are the most widely used in URLs, country pickers, and TLDs. Alpha-3 codes are three-letter (USA, GBR, VNM, BRA, FRA, DEU) and are used by ICAO, the IOC for the Olympic Games, and many statistical databases. Numeric codes (840, 826, 704, 076, 250, 276) appear in UN datasets. The converter passes through whichever code is in the source file; it does not attempt to translate between the variants or to lookup names against an outdated table.

Yes. The tool supports drag-and-drop multi-file input on desktop and a multi-file picker on mobile. All files are converted in parallel using Web Workers when supported by the browser (almost all modern browsers do), so 50 small GPX files convert in under a second on a typical laptop. The output is delivered as a single zip archive containing one converted file per input. Filenames are preserved with a new extension; subfolders inside the input file list become folders inside the output zip. Maximum batch size depends on available browser memory, typically 500 MB across all files combined.

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. The converter respects this byte order on import and export, but if you copy a hex colour from a design tool (which gives RGBA), you must reverse the byte order to get the correct KML colour. Use the colour picker built into the editor to avoid this trap entirely.

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 online KML, GPX to GeoJSON converter. Convert GPS tracks, waypoints, routes between KML, GPX, and GeoJSON formats w
KML GPX GeoJSON Converter