GPX ↔ KML Converter
Convert GPX tracks and waypoints to KML for Google Earth — or import KML Placemarks back to GPX. Elevation preserved, both directions, nothing sent to any server.
Drag & drop a .gpx or .kml file, or paste your data directly.
What This Tool Does
Convert between two of the most common XML-based geographic formats — GPX for GPS devices and KML for Google Earth.
How to Use
Logic Behind the Tool
How the two XML formats are mapped to each other.
<wpt> becomes a KML <Placemark> with a <Point>. Each <trkseg> within a <trk> becomes a separate <Placemark> with a <LineString> — a multi-segment track produces one Placemark per segment. Each <rte> becomes a single LineString Placemark. Names and descriptions carry through.<Point> Placemarks become <wpt> elements. <LineString> Placemarks become <trk> elements with a single <trkseg>. <Polygon> Placemarks are converted using their outer boundary ring as a closed track. KML styling, ExtendedData, folders, and camera data are discarded.lat and lon XML attributes (latitude first). KML uses comma-separated longitude,latitude,altitude in coordinate text nodes (longitude first). The tool correctly swaps the axis order. Elevation from GPX <ele> maps to KML altitude; missing elevation defaults to 0.<time>), GPX metadata (author, link, bounds), waypoint symbol (<sym>), and comments. KML → GPX loses: all styling (colors, icons, line widths), ExtendedData properties, folder hierarchy, ground overlays, camera views, and network links.Frequently Asked Questions
The most common reason is to view a GPS track in Google Earth. Google Earth does not natively open GPX files — it requires KML or KMZ. If you exported a hike, bike ride, or road trip from your GPS device or a fitness app, converting to KML lets you visualize the route in 3D terrain, measure altitude profiles, and share the layer with others via Google My Maps.
KML files are common in Google Earth, Google Maps exports, and government data portals. If you want to navigate a KML route on a Garmin device, Wahoo computer, or any GPS unit — or import it into Strava, Komoot, or AllTrails for navigation — you need GPX. This converter extracts the geometry and produces a GPX file your device or app can load.
Yes. KML has no standard mechanism for per-coordinate timestamps equivalent to GPX's <time> elements inside <trkpt>. KML does support <TimeStamp> and <TimeSpan> on Placemarks, but these apply to the entire Placemark, not individual track points. If timestamps are critical to your workflow, use the GPX ↔ GeoJSON converter instead — GeoJSON preserves them in a coordTimes array.
Yes, via Google My Maps. Go to mymaps.google.com, create a new map, click "Import" on a layer, and upload the .kml file. Your GPX tracks will appear as lines and waypoints as markers. Note that Google My Maps has a 10MB KML file size limit and some styling limitations compared to full Google Earth.
KML folders (<Folder> elements) are transparent to the converter — Placemarks inside folders are processed the same as top-level Placemarks using CSS querySelectorAll('Placemark'), which searches the entire document tree. Folder names are not preserved in the output GPX because GPX has no equivalent folder structure.