By · Updated

GPX to KML Converter

GPX to KML, GeoJSON or CSV and Back, Free in Your Browser

No ratings yet

OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.

How the GPX Converter works

This GPX to KML converter runs in your browser. Choose the file, check the preview on the map, pick the output format and download. The tool reads GPX, KML (including Google Earth's gx:Track recordings) and GeoJSON, keeps names, elevation and timestamps where the target format has a place for them, and writes the new file with the same name and a new extension. It all happens in the page, so a large ride file converts as fast as your computer can parse it.

GPX to KML: what changes between the formats

The three formats describe the same things — lines of coordinates and named points — in different dialects, so a lossless swap is usually possible.

GPX is the GPS interchange format: tracks (recorded), routes (planned) and waypoints, each point with optional elevation and time. Garmin, Wahoo, Suunto, Coros, Strava, Komoot, OsmAnd and nearly every outdoor app read and write it. Convert to GPX when you have a route drawn in Google Earth or a GIS and want it on a device.

KML is Google Earth's format and what Google My Maps exports. A GPX track becomes a LineString placemark, a waypoint becomes a Point placemark, elevation goes into the third coordinate, and timestamps are dropped because plain KML has nowhere to keep them per point. Reading KML, the converter takes LineStrings, Points and gx:Track elements, the last of which do carry times and so survive into GPX.

GeoJSON is what web maps, Mapbox, Leaflet, QGIS and most programming libraries want. Tracks become LineString or MultiLineString features with elevation in the coordinates and, when the source had timestamps, a coordTimes array in the properties — the convention used by Mapbox's togeojson, so other tools can put the times back. Note the coordinate order: GeoJSON is longitude first, GPX is latitude first, and the converter handles that.

CSV is for spreadsheets: one row per point with type, name, segment, index, latitude, longitude, elevation and time. It is a one-way trip — this tool does not read CSV back, but a spreadsheet with lat/lng columns can be turned into GeoJSON with the CSV to JSON tool and then converted here.

Routes versus tracks. A GPX route (<rte>) is preserved as a route on a GPX→GPX pass and becomes an ordinary line in KML and GeoJSON; converting back yields a track, since the distinction is lost. Files with nothing but a polygon convert with the polygon's outer ring as a line.

FAQ

Are timestamps kept when converting to KML?

Plain KML has no per-point time, so they are dropped. If you need the times, convert to GeoJSON instead, where they are stored as a coordTimes array that most tools recognise.

Can it convert CSV back to GPX?

No, CSV is output only. To go the other way, turn the spreadsheet into GeoJSON with the CSV to JSON tool, then convert that here.

Why did my route become a track?

GPX distinguishes planned routes from recorded tracks; KML and GeoJSON do not. Once a route has passed through either format the distinction is gone, so converting back to GPX gives a track.

Is there a file size limit?

Only what your browser can hold in memory. A multi-day ride with hundreds of thousands of points converts in a second or two; nothing is uploaded, so there is no server limit.

See also: all Data & Code tools, Units, Images, Audio & Video, Documents.

Related tools