How to Convert Google Maps to GPX

A complete guide to converting Google Maps directions into GPX files for Garmin, Wahoo, Strava, and any GPS device or navigation app.

Why convert Google Maps routes to GPX?

Google Maps is the most popular tool for planning routes, but it doesn't export to GPX — the universal file format used by GPS devices and fitness apps. If you want to follow a Google Maps route on your Garmin Edge, Wahoo ELEMNT, or any dedicated GPS device, you need a GPX file. The same applies if you want to import the route into Strava, Komoot, AllTrails, or OsmAnd.

gmaps2gpx bridges this gap. It takes any Google Maps directions URL and converts it into a standard GPX 1.1 file with full route coordinates, waypoint markers, and support for all travel modes including motorcycle/two-wheeler routing.

Step-by-step instructions

1

Create your route in Google Maps

Open Google Maps and enter your starting point and destination. Click "Directions" to generate a route. You can:

  • Add multiple stops along the way
  • Drag the route line to customize the exact path (gmaps2gpx preserves these via-points)
  • Choose between driving, walking, cycling, or transit modes
  • View alternative routes suggested by Google
2

Copy the Google Maps link

Click the Share button (or the hamburger menu) and select "Copy link". You'll get either a full URL like google.com/maps/dir/... or a shortened URL like maps.app.goo.gl/.... Both formats work with gmaps2gpx.

3

Paste into gmaps2gpx and convert

Go to gmaps2gpx.vercel.app, paste your URL into the input field, select your travel mode (driving, cycling, walking, motorcycle, or transit), and click Convert. The tool resolves shortened URLs, extracts waypoints, and calls the Google Directions API to generate precise route coordinates.

4

Select from alternative routes

If Google returns multiple route options, gmaps2gpx displays all of them as clickable cards with distance and duration. Each route is drawn on the map — the selected route in green, alternatives in gray. Click any route card to preview it before downloading. The shortest route is labeled automatically.

5

Download GPX or edit in gpx.studio

Click Download GPX to save the file to your device. If you want to add elevation data, adjust waypoints, or split the track, click Edit in gpx.studio to open the file directly in the gpx.studio online editor.

6

Import into your GPS device or app

Import the GPX file into your device or app:

  • Garmin: Upload to Garmin Connect, then sync to your device. Full Garmin guide →
  • Wahoo: Import via the Wahoo ELEMNT Companion app. Full Wahoo guide →
  • Strava: Go to Routes > Create Route > Import GPX
  • Komoot: Import via the web app or mobile app
  • AllTrails: Create a custom map and upload the GPX

Tips for better GPX conversions

  • Use motorcycle mode for two-wheelers: If you're planning a motorcycle route in India or Southeast Asia, select Motorcycle mode. It uses Google's Routes API with TWO_WHEELER travel mode, which gives routes suited for motorbikes rather than cars.
  • Drag routes for precision: If Google's default route doesn't follow the road you want, drag the route line in Google Maps. gmaps2gpx extracts these custom via-points from the URL's data parameter.
  • Check alternatives: When Google shows multiple routes, gmaps2gpx lets you preview each one on the map before downloading. The shortest route is automatically labeled.
  • Add elevation in gpx.studio: Google's Directions API doesn't always include elevation data. Click "Edit in gpx.studio" to automatically add elevation from SRTM datasets before importing into your device.
  • Use the CLI for batch conversion: If you need to convert multiple routes, install the CLI tool with pip install gmaps2gpx and pass multiple URLs at once.

Supported travel modes

gmaps2gpx supports all Google Maps travel modes:

Driving
Cycling / Bicycling
Walking / Hiking
Transit / Public transport
Motorcycle / Two-wheeler

Motorcycle mode uses the Google Routes API with TWO_WHEELER travel mode, which provides routes optimized for motorbikes — especially useful in countries like India, Thailand, Vietnam, and Indonesia where two-wheeler routes differ significantly from car routes.

Ready to convert your route?

Open gmaps2gpx converter →