Skip to content
FlipConverto home

KML to GPX Converter

Convert KML to GPX or GPX to KML in your browser. Placemarks and waypoints, paths and tracks swap formats with their names, descriptions, elevations and timestamps; the direction is detected from the file.

Loading KML to GPX Converter…

Runs entirely in your browser. Files stay on your device — nothing is uploaded. Verify it yourself

How do you convert KML to GPX?

Read each KML placemark: points become GPX waypoints and LineStrings become tracks of trkpt points, with name, description, altitude and time moved to name, desc, ele and time. Open a .kml file here and the GPX is written for you; GPX to KML works the same way in reverse.

Cost
Free, no limits
Upload
None — runs on your device
Sign-up
Not required
Works offline
Yes, once loaded

How to convert KML to GPX

  1. Open the file

    Press Open KML or GPX and choose a .kml or .gpx file, or paste its XML. Load sample GPX shows a short track.

  2. Check the direction

    KML is converted to GPX and GPX to KML automatically; the panel title shows which.

  3. Choose track times

    For GPX → KML, turn on Keep track point times to write gx:Track, which keeps every point’s time.

  4. Download

    Read any notes about what was left out, then press Download to save the converted file.

Examples

  • <Placemark><name>Summit</name><Point><coordinates>-3.0,54.4,978</coordinates></Point></Placemark><wpt lat="54.4" lon="-3"> <ele>978</ele> <name>Summit</name> </wpt>

    KML puts longitude first; GPX uses lat and lon attributes.

  • <trkseg><trkpt lat="51.5" lon="-0.1"/><trkpt lat="51.6" lon="-0.2"/></trkseg><LineString> <tessellate>1</tessellate> <coordinates>-0.1,51.5 -0.2,51.6</coordinates> </LineString>

Key features of the KML to GPX Converter

  • Detects KML or GPX from the file and converts to the other
  • Reads placemarks in any folder, with Points, LineStrings, MultiGeometry, polygons and gx:Track
  • Keeps names, descriptions, elevation and timestamps where both formats can hold them
  • Optional gx:Track output so GPX track times survive in KML
  • Escapes every value in the XML it writes
  • Lists anything left out — styles, overlays, invalid coordinates, date-only times

What it converts

Directions

  • KML → GPX
  • GPX → KML

KML read

  • Point
  • LineString and LinearRing
  • Polygon (outer edge)
  • MultiGeometry
  • gx:Track and gx:MultiTrack

GPX read and written

  • wpt waypoints
  • rte routes
  • trk tracks with segments
  • GPX 1.1

Not supported

  • KMZ (unzip first)
  • Shapefiles
  • GeoJSON

When should you use this?

  • Loading a route planned in Google Earth or Google My Maps onto a GPS device or into a sports app.
  • Viewing a recorded GPX run, ride or hike in Google Earth.
  • Sharing saved places between mapping apps that only accept one of the two formats.

Limitations

  • KMZ (zipped KML) is not opened; unzip it and open the doc.kml inside. Shapefiles and GeoJSON are not supported.
  • Styles, icons, network links, overlays and 3D models are not carried over, nor are GPX extensions such as heart rate.
  • Polygons become closed tracks along their outer edge; holes are not kept.
  • Files are limited to 5 MB.

Troubleshooting

"not well-formed XML"

The file is damaged or is not XML — for example a KMZ renamed to .kml, or a file cut short. Re-export it from the app it came from.

Some points are missing

Coordinates outside ±90° latitude or ±180° longitude, or with text where numbers belong, are skipped and counted in a note. Check the source for swapped or garbled values.

Common mistakes to avoid

  • Swapping latitude and longitude when editing by hand. KML coordinates are longitude,latitude; GPX attributes are lat and lon.
  • Expecting a plain KML LineString to keep track times. Turn on Keep track point times to write gx:Track.

Pro tips

Tips for better results

  • Tracks vs routes

    Tracks are what you recorded, routes what you plan

    Use GPX tracks for things you recorded and routes for things you plan; most devices treat them differently.

  • Styles

    Keep the original KML if it has styles

    Keep a copy of the original KML if it has styles — they cannot survive the trip through GPX.

  • KMZ

    The doc.kml inside a KMZ holds the data

    For a KMZ from Google Earth, the doc.kml inside usually holds everything except the custom icons.

Two formats for the same places

KML is Google Earth’s format: placemarks holding points, lines and polygons, often grouped in folders. GPX is the format GPS devices and sports apps exchange: waypoints, routes and tracks made of timed points. Both are XML. When you convert KML to GPX, every placemark is read wherever it sits in folders; when you convert GPX to KML, each waypoint, route and track becomes a placemark.

How things map

  • Points — a KML Point placemark becomes a GPX wpt, and back. The placemark name, description and TimeStamp go to name, desc and time; the altitude to ele.
  • Lines — a KML LineString becomes a track (trk, trkseg, trkpt); several lines in one MultiGeometry become segments of one track. A GPX track becomes a LineString placemark, or a MultiGeometry for several segments; a GPX route (rte) also becomes a LineString.
  • Timed tracks — Google Earth’s gx:Track, which stores a time for every point, is read into track points with times. Going from GPX to KML, a plain LineString cannot store per-point times; turn on “Keep track point times” to write gx:Track instead. Because gx:Track needs an altitude for every point, points without an elevation get 0, and a note says how many.
  • Polygons — GPX has no areas, so a polygon’s outer edge is written as a closed track, with a note.

What is not carried over

Styles (line colours, icons), KML network links, image overlays and 3D models have nowhere to go in GPX, and GPX extensions such as heart rate or cadence have nowhere to go in KML. Anything left out is named in a note above the result. GPX times must include a time of day, so a KML TimeStamp that is only a date or a month is dropped, with a note. The KML written does not set an altitude mode, so Google Earth draws it on the ground; the altitudes are still kept in the coordinates.

KMZ files and shapefiles

A KMZ file is a KML file zipped together with its icons and images. This tool does not unzip it: rename the .kmz to .zip, extract it, and open the doc.kml inside. Shapefiles (.shp) and GeoJSON are other formats again and are out of scope here.

Sources

Privacy and file handling

The KML to GPX Converter runs entirely in your browser. Your file is read by the page, processed on your own device, and the result is handed straight back to you — no copy is sent anywhere, because none needs to be.

You can confirm this rather than take our word for it: open your browser’s developer tools, watch the Network tab, and use the tool. No request carries your file or your input. It also keeps working with the connection off.

Details are in the privacy policy.

What next?

Switch a route length between kilometres and miles.

Convert distances

KML to GPX Converter — questions

How do I convert KML to GPX?

Press Open KML or GPX and choose the .kml file, or paste its contents. The GPX appears below with a count of waypoints, lines and points; Download .gpx saves it under the same name.

How do I convert GPX to KML for Google Earth?

Open the .gpx file the same way; the direction is detected from the file. Turn on Keep track point times if you want Google Earth to play the track back over time.

Can it open KMZ files?

No. A KMZ is a zipped KML. Rename it to .zip, extract it, and open the doc.kml file inside.

Are elevation and timestamps kept?

Yes, where the file has them. Elevation moves between GPX ele and the KML altitude value. Waypoint times transfer both ways, except KML dates with no time of day, which GPX cannot hold. Track point times transfer from KML gx:Track, and to KML when Keep track point times is on.

Is my GPS track sent anywhere?

No. The file is read and converted in your browser, so where you have been stays on your device.

Part of Developer Tools · Browse every tool