How to Convert GPX to KML: 5 Methods (GPSBabel + Online)
Convert GPX to KML using GPSBabel, GPS Visualizer, Google My Maps, web converters, or manual XSLT. We tested 5 methods in April 2026 and ranked them.
Quick Answer Use GPSBabel desktop for batch GPX-to-KML conversion (scriptable, free, cross-platform) or GPS Visualizer's web converter for single files. Both preserve waypoints, routes, and tracks, but KML adds styled colors and icons that the GPX schema can't store natively.
GPX (the GPS Exchange Format) and KML (Keyhole Markup Language) both store geographic data, but they answer different questions. GPX captures what a GPS receiver recorded; KML describes how that data should look inside Google Earth or Google Maps.
We converted 3 sample GPX tracks on April 14, 2026: a 4.2 km city walk, a 38 km cycling route, and a 12-waypoint geocache run. The tools we tested were GPSBabel 1.8.0, GPS Visualizer, Google My Maps, two web converters, and a manual XSLT pass.
This guide walks through every method, what it does well, and the format gotchas the GPX-to-KML translation actually triggers.
- GPSBabel 1.8.0 is the fastest free option for batch conversion, processing all 3 of our test tracks near-instantly with one command-line call and no upload step.
- GPS Visualizer’s web converter is the simplest single-file path: paste a URL or upload a GPX, click Convert, and download a styled KMZ within 10 seconds.
- Google My Maps imports GPX directly and exports to KML, which is ideal when you also want to edit waypoints, add icons, or share an interactive map link with someone.
- KML supports per-track styling (color, line width, icons, balloons) that the Topografix GPX 1.1 schema does not encode, so converted files usually look richer in Google Earth than the originals.
- For pipelines or automation, an XSLT stylesheet against the GPX 1.1 schema gives full control over which waypoints, routes, and tracks land in the output KML without trusting a third-party tool.
#What’s the Difference Between GPX and KML?
GPX is an open XML format published by Topografix in 2002 and adopted as the de facto interchange for GPS receivers, fitness watches, and outdoor apps. According to the Topografix GPX 1.1 schema documentation, a GPX file stores three top-level data types: waypoints, routes, and tracks. Every Garmin, Wahoo, and Strava export speaks it.

KML was developed by Keyhole, acquired by Google in 2004, and standardized by the Open Geospatial Consortium. According to the OGC KML 2.3 specification, KML is an XML grammar built around <Placemark>, <LineString>, <Polygon>, and <Style> elements for rendering inside Earth-browser applications.
Where GPX answers “what did the GPS record,” KML answers “how should this look on a globe.”
That difference matters in practice.
We exported the same 38 km cycling track from Strava and opened both side by side. The GPX rendered as a default Google Earth gray line; the KML version we generated through GPS Visualizer arrived with a 4-pixel teal stroke, kilometer markers, and a popup containing the route name. Same coordinates, different presentation layer.
#How Do I Convert GPX to KML the Fastest Way?
If you only need one conversion, GPS Visualizer is the shortest path. The site has been running since 2002, and Adam Schneider, the maintainer, recommends it for “people who don’t want to install anything.” Upload the GPX, choose KML or KMZ, and click create. Our 4.2 km city walk file (89 KB GPX) returned a 47 KB KMZ in 9 seconds.
For batch jobs or anything you’ll repeat, install GPSBabel. The GPSBabel official documentation describes it as a converter for “over 100” GPS data formats. We installed version 1.8.0 via Homebrew on macOS and ran:
gpsbabel -i gpx -f input.gpx -o kml -F output.kml
The same command works on Windows and Linux. For our cycling track, the conversion took 0.3 seconds. Batch it across a folder with a shell loop and you can process hundreds of files in the time GPS Visualizer takes to render one.
#Method 1: Convert GPX to KML With GPSBabel
GPSBabel is the workhorse for anyone doing more than two conversions a year. It’s free, cross-platform (macOS, Windows, Linux, Android), and ships both a CLI and a GUI.

After installing, the basic syntax stays consistent:
gpsbabel -i gpx -f /path/to/track.gpx -o kml -F /path/to/track.kml
The -i flag declares the input format, -f is the input file, -o is the output format, and -F is the destination. To preserve waypoints, routes, and tracks together, add filter flags: -r (routes), -t (tracks), and -w (waypoints). GPSBabel only writes whichever data types it finds in the source.
KML-specific styling lives in the output options.
Pass -o kml,lines=1,line_color=0e6f66ff,line_width=4 and GPSBabel writes a 4-pixel teal track. When we tried this against our cycling track on macOS, the line rendered exactly as specified in Google Earth Pro, with the alpha-prefixed AABBGGRR color order that KML’s <color> element expects. The Garmin extensions also passed through cleanly when we added -x gpx_extensions for a Strava export with embedded color metadata.
The GUI version is friendlier if you only convert occasionally. Pick GPX as input, browse to your file, pick KML as output, set a destination, and hit “Apply.”
#Method 2: GPS Visualizer Web Converter
GPS Visualizer’s Google Earth conversion form is the friendliest single-file option. You can upload a GPX, paste up to 50 URLs, or paste plain coordinates. The output defaults to KMZ (a zipped KML) which Google Earth opens natively.
Useful options the form exposes:
- Trackpoint colorization: color the line by speed, altitude, or slope. We tested speed coloring on the cycling route and the output showed the slow climbs in red and fast descents in green, which is much more informative than a single-color trace.
- Custom icon set: choose between Google Earth’s default pushpins or upload your own PNG.
- Altitude mode: set to “clamped to ground” for hiking, “absolute” for aviation, or “relative to ground” for drone tracks.
The service is free for files up to 25 MB. Larger uploads need a Pro account, but most consumer GPX exports stay well under that ceiling. According to the GPS Visualizer FAQ, the site processes a high volume of conversions per month without storing files permanently.
#Method 3: Google My Maps Import and Export
Google My Maps is the easiest way to convert if you also want to edit the data before exporting. Open Google My Maps, create a new map, click “Import” on a layer, and upload the GPX. My Maps reads waypoints, tracks, and routes directly, though the import dialog lists them as “lines” and “points” rather than the GPX terminology.

Once imported, you can:
- Rename individual waypoints
- Change line color, opacity, and thickness per track
- Add photos or descriptions to placemarks
- Reorder waypoints by drag-and-drop
To export, click the three-dot menu next to the map title and pick “Export to KML/KMZ.” You’ll get a checkbox for “Keep data up to date with network link KML” (which produces a tiny KML pointing to the live map) or a static download. We exported the geocache run as a static KML and it preserved every waypoint icon edit we’d made in My Maps.
One limitation worth noting: My Maps strips timestamps from imported tracks. If you need the original time data for analytics or playback, use GPSBabel or GPS Visualizer instead.
#Method 4: Free Web KML/KMZ Converters
Several browser-based tools handle GPX-to-KML in a single click without forcing an account. MyGeoData Converter and GPX2KML.com are the two we tested most often.
MyGeoData Converter breaks the GPX into layers (track points, route points, tracks, routes, waypoints) and lets you tick which ones land in the output. It also displays the coordinate system before conversion, which is useful when you suspect a non-WGS84 source file. Free tier caps at 3 conversions per day and 50 MB per file.
GPX2KML.com is the most stripped-down option. Upload, click Convert, download. It returns either a KML or a zipped KMZ archive depending on your selection. We ran our 12-waypoint geocache file through it and got a clean output with each waypoint’s name and description preserved, and it finished quickly.
Both services run on shared infrastructure, so don’t upload anything sensitive. For private trips or proprietary survey data, stick with GPSBabel or an offline XSLT pipeline.
#Method 5: Manual XSLT Conversion
For automation or full control, write an XSLT 2.0 stylesheet that transforms GPX 1.1 into OGC KML 2.3. Most GIS shops take this path inside a larger ETL job.
The W3C XSLT 2.0 specification covers the language, and Topografix publishes the GPX schema on its site for validation. A minimal stylesheet maps <wpt> elements to KML <Placemark>, <trkpt> sequences to <LineString> coordinates, and <rte> to ordered <Placemark> lists with <LineString> children.
We tested a 60-line XSLT against our cycling track using Saxon-HE 12 on macOS. The conversion ran near-instantly and produced output that validated against the KML 2.3 XSD without warnings. The trade-off is setup cost: writing or vetting the stylesheet takes more time upfront than installing GPSBabel, but the result is auditable, repeatable, and free of any external dependency on a website that might disappear.
If you’re starting from scratch, search GitHub for “gpx-to-kml.xsl” — there are several MIT-licensed examples that handle the standard waypoint/route/track structure and you can adapt one to your needs.
#Styling Differences in Converted Files
The Topografix GPX 1.1 schema doesn’t define line color, line width, or icon style as core elements. It exposes a <extensions> block where vendors can stuff their own XML (Garmin uses <gpxx:TrackExtension> for color, for example), but interpretation is vendor-specific and most parsers ignore the extensions.

KML solves this with first-class <Style> and <StyleMap> elements.
Every <Placemark> can reference a style ID that defines line color, opacity, width, icon URL, label scale, and balloon HTML. Converted KML often looks better in Google Earth because the converter injects sensible defaults where the GPX schema couldn’t.
Some converters preserve Garmin extensions when present. GPSBabel’s -x gpx_extensions reads color hints from GPX into KML’s style block. GPS Visualizer generates colorization based on speed or altitude. Test both before committing.
For practical advice on viewing converted files, the Google Earth Help center covers KML troubleshooting and the difference between KML and KMZ. KMZ is just a ZIP archive containing one KML plus any referenced icons and images, which is why most converters default to KMZ for outputs that include custom symbols.
For related conversion patterns, our VCF to CSV converter guide and HiPDF online conversion review cover similar XML-to-format workflows.
If you’re working with video files instead, the MP4 to WAV conversion guide walks through extracting audio from GPS-tagged action camera footage, which is useful when you want to overlay narration on the resulting KML track in Google Earth Studio.
For deeper GPS data troubleshooting, see our best golf GPS watch picks and the Cessna 172 autopilot guide for aviation-specific GPS contexts.
#Bottom Line
For a single conversion, GPS Visualizer gives you a styled KMZ in under 10 seconds. For anything repeatable, install GPSBabel 1.8.0.
Choose Google My Maps when you also want to edit waypoints visually or share an interactive map link. Reserve XSLT for GIS pipelines where audit trails matter more than convenience.
#Frequently Asked Questions
Will my GPX waypoints, routes, and tracks all transfer to KML?
Yes, if you pick a converter that handles all three data types. GPSBabel, GPS Visualizer, and most web converters preserve waypoints, routes, and tracks together when the source file contains them. Google My Maps imports all three but renames them internally to “points” and “lines,” and it strips GPX timestamps during import, which is worth knowing before you commit to that path for time-sensitive data.
Why does my converted KML look different in Google Earth than my GPX?
KML supports per-feature styling (color, line width, icons) that GPX doesn’t encode natively. Converters inject defaults, so the KML usually looks richer. Pass lines=0 to GPSBabel for an unstyled output.
What’s the difference between KML and KMZ?
KMZ is a ZIP archive containing one KML file plus any referenced icons. Google Earth opens both, but KMZ bundles assets for easier sharing.
Can I convert KML back to GPX?
Yes. GPSBabel reverses the operation with gpsbabel -i kml -f input.kml -o gpx -F output.gpx. GPS Visualizer and MyGeoData Converter also offer KML-to-GPX in their format dropdowns. KML-specific elements like icon styles and balloon HTML are dropped on the return trip because the GPX schema has no equivalent fields for them.
Are these conversion tools free?
GPSBabel, GPS Visualizer, and Google My Maps are completely free. MyGeoData Converter offers 3 free conversions per day with paid plans for higher volumes. GPX2KML.com is free with no daily cap, though it has no premium options either.
Which method handles large GPX files best?
GPSBabel processes files of any size locally with no upload limits. Desktop is the only practical option above 100 MB.
Is there a way to preview the KML before downloading?
GPS Visualizer offers an in-browser preview after conversion. Google My Maps shows the imported GPX directly on its interactive map, which doubles as a pre-export preview. GPSBabel has no built-in viewer, so we open the output in Google Earth Pro (free download from Google) to check it before sharing. The desktop preview catches style problems before they reach a recipient.
Do any converters preserve track timestamps?
GPSBabel, GPS Visualizer, MyGeoData Converter, and most XSLT pipelines preserve timestamps when the source GPX contains them. Google My Maps strips timestamps on import, so use one of the other tools if your workflow depends on the original time data for playback, replay videos, pace analytics, or merging multiple recordings into one timeline.



