iPhone location journals
Convert KML to GPX, or GPX to KML, in your browser
See what was kept and what was dropped before you download. Google Earth gx:Track timestamps become GPX times, and GPX times come back out as gx:Track.
Choose a KML or GPX file. It is converted on this device.
The direction is detected from the file’s content, not its name. KML becomes GPX 1.1; GPX becomes KML 2.2. You see a report of what was kept, changed and skipped before you download. No account, upload or analytics. The file is read with your browser’s File API and never leaves the page.
Choose a file, or try one of the synthetic samples first.
Conversion report
In your file
In the result
Skipped or changed
Next: open the downloaded GPX in the GPX viewer to check it.
What converts to what
KML stores a coordinate as longitude,latitude[,altitude]. GPX writes latitude and longitude as separate attributes, so the tool swaps them for you and keeps the digits exactly as written. Positions with missing, non-numeric or out-of-range coordinates are left out and counted.
| KML | GPX | Result |
|---|---|---|
Placemark with a Point | <wpt> with name, description, <ele> | Kept |
LineString | <trk> with one <trkseg> | Kept; altitude becomes <ele> |
MultiGeometry of LineStrings | One <trk>, several <trkseg> | Kept |
gx:Track | <trkseg> of <trkpt> with <time> and <ele> | Kept, times written in UTC |
gx:MultiTrack | One <trk>, one segment per gx:Track | Kept |
Polygon, LinearRing, Model | None | Dropped and reported, never turned into a track |
| Folders, styles, icons, ExtendedData, NetworkLink, overlays, TimeStamp/TimeSpan on features | None | Dropped and reported |
| GPX | KML | Result |
|---|---|---|
<wpt> | Placemark with a Point | Kept; the waypoint’s time is not carried |
<trkseg>, every point has a time | gx:Track (or gx:MultiTrack for several segments) | Kept with times, when “Keep timestamps” is on |
<trkseg> otherwise | LineString (or MultiGeometry) | Changed: times are lost |
<rte> | LineString | Changed: times are lost |
| Segments or routes with one point | None | Dropped and reported (a LineString needs two positions) |
| Extensions, links, comments, symbols, accuracy fields | None | Dropped and counted |
KML output declares the gx namespace only when a gx:Track is written. A line gets altitudes only if every position in it has one, so no elevation is invented. The same input always gives a byte-identical file, named like the input with the new extension.
Worked example: a synthetic file
These files are invented, near 0° N 10° E, and are not anyone’s recording. synthetic-kml-to-gpx.kml has 2 Points, 1 LineString, 1 gx:Track of 5 timed points and 1 Polygon. synthetic-kml-to-gpx.expected.gpx is the expected result, and synthetic-kml-to-gpx.expected.kml is what that GPX converts back to. The buttons above load the same samples.
| Measure | KML in | GPX out |
|---|---|---|
| Placemarks | 5 | – |
| Points → waypoints | 2 | 2 |
| LineString + gx:Track → tracks (one segment each) | 2 | 2 tracks, 2 segments |
| Track points | 3 + 5 | 8 |
| Positions with a time | 5 | 5 (2000-01-01 12:00 to 12:04 UTC) |
| Positions with elevation | 9 | 9 |
| Polygons | 1 | Skipped, reported |
Why times survive only through gx:Track and GPX <time>
A GPX <trkpt> can carry its own <time>. A plain KML LineString is only a list of coordinates, with no place for a time per point. Google’s gx:Track extension fixes that by pairing each <when> with a <gx:coord>. So GPX → KML keeps times only as gx:Track, and a LineString (or a GPX route) loses them. The report shows how many timestamps went in and came out, and its first and last time.
Times are written as UTC date-times (RFC 3339 style). A time without a time zone, or a date with no time, is not guessed: the position is kept without a time and the report counts it. Not every KML consumer reads gx:Track; if yours doesn’t, turn the checkbox off to get plain LineStrings.
Limits
- One file, up to 10 MiB and 50,000 points, the same limits as the GPX viewer.
- KMZ is not supported. A KMZ is a zip with a
doc.kmlinside; this page has no unzip step. Unzip it yourself and choose the KML. Images inside a KMZ are never converted. - Polygons are skipped and reported; GPX has no area shape.
- Styles, icons, ExtendedData, folders and overlays are dropped.
- NetworkLinks are not followed; this page makes no network requests.
- Altitudes are copied as written. KML altitude modes are not interpreted.
- Files with a DOCTYPE or entity declaration are refused.
Check the result
Open the converted GPX in the GPX viewer and compare its counts with the report; the GPX checking tutorial explains each warning. Several converted files can be joined with Merge GPX. To see which countries a file covers, use the visited countries map. Choosing between formats? Read how GPX, KML, GeoJSON and CSV differ.
Questions
Is my file uploaded?
No. Parsing and writing happen in this page. Its content security policy blocks network connections and the page loads no analytics. The server sees an ordinary request for the page and its scripts, not your file.
Does it keep elevation?
Yes. KML altitude becomes GPX <ele> and back, as written. When only some points in a KML line have an altitude, that line is written without altitudes.
Can I convert KMZ?
Not directly. Unzip the KMZ and choose the doc.kml inside.
Why are my times missing?
Plain KML LineStrings and GPX routes cannot carry per-point times, and KML Placemark points here are not given times. Only gx:Track and GPX track points do. Check that “Keep timestamps (gx:Track)” is on, and read the report for times without a time zone.
Does Garmin or Google Earth accept the output?
We haven’t tested specific apps or devices. The GPX is checked against the GPX 1.1 schema in the site’s tests, and the KML is standard KML 2.2 with the gx extension only where used.
Does Whereday import KML?
No. Whereday exports KML and GPX; its import is limited to supported Google Timeline JSON.
Sources
- OGC KML 2.2 standard (OGC 07-147r2)
- Google KML reference, which defines
gx:Trackandgx:MultiTrack - Google: time and animation in KML
- GPX 1.1 schema documentation (Topografix)
- RFC 3339: date and time on the Internet
Export options in Whereday are described in the export and import reference; the route recording guide shows how to record and export a GPX.
Record routes once, export them anywhere.
Record routes once and export them as GPX or KML for any date range. Whereday keeps your location history on your iPhone.
Download free for iPhone