KML to GPX Converter: Google Earth onto Your GPS

All tools
Report

Heading to the field? Install this site from your browser menu and this tool works with no signal. See how

Converter

Nothing is uploaded. The file is converted on your own device, so it works with no signal.

Drop a file here or

Nothing leaves your device.

No file to hand?

Waiting for a file.

Features in this file

NameTypeFolderVerticesLengthArea

A table of what survives a KML to GPX conversion. Points and waypoints, lines routes and tracks, and height on each point are marked as carried across exactly. Names and descriptions are carried but many devices truncate them. Polygons and areas have no area type in GPX and become a closed track. Icons colours and styles, folders and nesting, and ground overlays and images have no equivalent and are dropped. A band below explains that GPX has waypoints, routes and tracks and nothing else, so a boundary becomes a track that happens to end where it started, with nothing recording that it encloses anything.
The amber and red rows are all silent losses. Nothing warns you that your folder structure or your colour coding did not make it onto the device.

How to use this tool

Drop a .kml file above, check what is in it on the map, then press Convert to GPX and download. Copy the resulting file onto your device, usually into a folder called GPX on the unit or through whatever software the manufacturer supplies.

If you have a .kmz rather than a .kml, use the KMZ to GPX Converter instead, which unzips it first. Same engine, same output.

What a GPS device will actually accept

GPX has three containers and nothing else: waypoints, routes and tracks. KML can describe a great deal more than that, and the surplus has nowhere to go.

Points, lines, names, descriptions and heights all cross over cleanly. Icons, colours, line styles, balloon layouts, folder structure and ground overlays do not, because GPX has no way to express any of them. None of that produces a warning, so it is worth knowing before you convert rather than after.

The one that surprises people is polygons. GPX has no area type at all. A permit boundary, a lake or a field becomes a track that happens to end where it started. The shape is preserved exactly and your device will draw it, but nothing in the file records that it encloses anything, and no device will tell you whether you are inside it.

A worked check you can repeat on paper

Take a square drawn in Google Earth with corners at 0 and 1 degrees east, 45 and 46 degrees north. As a KML polygon it is a LinearRing with five coordinate pairs, the fifth repeating the first to close the ring.

Convert it and open the GPX. You get a trk containing one trkseg with five trkpt elements, the fifth identical to the first. Count them and the geometry is intact, vertex for vertex.

What is gone is the meaning. The KML said this is an area with an inside and an outside. The GPX says here is a path that returns to its start. If the original polygon had a hole in it, an inner boundary, that hole becomes a second, separate closed track with no recorded relationship to the first.

So the practical rule is: convert polygons to GPX when you want to see the boundary on a device, and do not expect the device to do anything clever with it.

Device limits worth knowing before you load the file

The GPX specification imposes no limits at all. Individual units impose plenty, and they vary.

Waypoint names are commonly truncated, sometimes to as few as six or ten characters, and units differ on whether they truncate or refuse. If your names carry meaning, shorten them yourself before converting so you control what survives.

Route point counts are limited on many units, often to somewhere between 50 and 250. A route with more turning points than the device allows is either truncated or rejected. A recorded track is a different matter, since tracks are usually stored more generously, but a five thousand point track will still fill a small unit quickly.

Some units also cap the number of separate files or the number of waypoints in total. If a file will not load, splitting it is more productive than fighting it.

How this was checked

Every conversion is compared against an independently written implementation running outside the browser, and the round trip is tested rather than just the single direction. A KML in, a GPX out, parsed back by the second implementation, and the coordinates compared: the first waypoint arrives at exactly minus 109.05 and 37.0, to the last digit a double can hold.

The output is also checked for the thing that actually matters in this direction, which is that latitude and longitude land in the right attributes. The written file carries lat="37" and lon="-109.05", named rather than positional, which is why nothing downstream has to guess.

Mistakes that catch people out

Expecting your Google Earth styling to appear on the device. It will not. Colours and icons are Google Earth concepts, and GPX has no field for them.

Converting a folder structure and losing track of what is what. GPX has no folders. If your KML organised features into groups that mattered, put that information into the names before converting.

Loading a huge track onto a small unit. A dense recorded track can exceed what the device will store, and some units silently keep only the first portion. Check the far end of the track on the device before relying on it.

Assuming the device reads any GPX. Most read GPX 1.1, which is what this tool writes, but some older units want GPX 1.0 and a few want a manufacturer flavour. If a unit refuses a valid file, that is usually why.

Forgetting to check the file on a map first. It takes ten seconds here and saves discovering in the field that the route went to the wrong valley.

Related Calculators and Reference

Getting a plan onto a device is usually the last step before going out.