TrailCam

Guides

How to convert a GPX file to KML

GPX and KML look similar from a distance — both are XML, both describe coordinates on a map — but they come from different worlds and a file in one format is not automatically readable as the other. Here is when converting is actually necessary, how to do it, and what gets lost along the way.

The short answer

The fastest route is a free online converter such as GPS Visualizer or gpx2kml: upload the GPX, download a KML back. If you would rather not upload a route to a third-party site, GPSBabel does the same conversion on your own computer, and QGIS can open a GPX layer and export it as KML with a couple of menu clicks.

Before converting anything, check whether you actually need to. Google Earth Pro opens a GPX file directly with no conversion at all. The tool that genuinely requires KML is Google My Maps, the web app for building a custom shareable map — it accepts KML, KMZ, GeoJSON or a spreadsheet of coordinates, but not GPX.

Why the two formats exist separately

GPX was built for GPS devices

GPX — GPS Exchange Format — was designed as a lowest-common-denominator way for GPS receivers, watches and phones to hand a track, route or waypoint to any other device or piece of software. It stays deliberately narrow: coordinates, elevation, timestamps, names. Nothing about how the data should look on screen.

KML was built for Google Earth

KML — Keyhole Markup Language, named after the company Google acquired to build Earth — describes not just where things are but how to present them: icon styles, placemark colours, camera views, folders of layered content. It is the native language of Google's mapping tools, which is why anything downstream of Google Earth or My Maps tends to ask for it specifically.

What survives the conversion, and what does not

A GPX track converts to a KML LineString cleanly enough for the shape of the route to come through intact — the line you walked will look the same on the map either way. Two things are worth checking afterward:

  • Per-point timestamps: a plain KML LineString has no field for the time at each point, so a straightforward conversion can flatten a timestamped track into a static line with the timing gone. Some converters write the richer gx:Track extension instead, which does preserve per-point time — worth checking the output file for a gx:Track tag if replay speed matters to you.
  • Elevation: most converters carry elevation across, since both formats support a numeric altitude per point, but it is worth spot-checking a few points after conversion rather than assuming.
  • Waypoints and track points end up as separate KML placemarks and line vertices respectively, the same underlying distinction as in GPX itself.

None of this means conversion is unreliable — it means a converted file is not obligated to carry information the destination format does not require. Keep the original GPX as the record of what actually happened, and treat a converted KML as a presentation copy made for a specific destination.

When you would actually do this

In practice the reason to convert is almost always Google My Maps: sharing a route with people who do not use a GPS app, embedding a map on a website, or building a layered map of several routes with custom pins and colours. My Maps reads KML happily and gives you styling controls GPX was never meant to carry.

If your destination is a mapping or route-tracking platform rather than Google's own tools — Strava, Garmin Connect, Komoot, Gaia GPS, CalTopo — keep the file as GPX. All of them read it natively, and converting to KML and back only adds a step and a chance to lose the timestamps that make pace and moving time possible to calculate at all.

What TrailCam exports

TrailCam records a route with GPS and exports it as GPX 1.1 — a single route or the whole history at once — or as a CSV summary. That GPX file is the one to convert if a specific destination needs KML; it is also the one worth keeping as the permanent copy, since it is the format every mapping and route-tracking platform reads without any conversion step. It is free to download.

Questions

Does Google Earth need a KML file, or will it open a GPX?
Google Earth Pro opens a GPX file directly. Conversion to KML is only necessary for tools that specifically require it, most commonly Google My Maps.
Will converting a GPX to KML keep my timestamps?
Not always. A basic conversion to a plain KML LineString typically drops per-point timestamps. Some converters use the gx:Track extension instead, which does keep them — check the output if replay timing matters.
Can I convert a KML file back to GPX?
Yes, the same tools generally convert in both directions. The same caveat applies in reverse: anything KML-specific, like placemark styling, has no equivalent field in GPX and will not carry over.

Recording your own routes

TrailCam is an iPhone app that records your route with GPS, keeps video clips, photos and voice notes pinned to the spot where you took them, and exports the result as GPX 1.1 or CSV. It is free to download.

Download on the App Store