Fork me on GitHub


Originally taken from version 6.4j: 2011.07.12
gMapToGPX is a simple bookmarklet that allows you to convert Google Maps driving directions into GPX format, which can then be used in a number of ways. I took on this project because the original version stopped working and has not been updated for some time. The problem is that the script is heavily coupled to Google Maps internal data structures and thus, when gMaps updates, it's possible that the script will stop working.

Please note that this utility is designed to work on Google Maps driving/walking directions directly as well as a number of sites that are are mashups of Google Maps. In my case, I originally did this because I wanted to load running maps from onto my Garmin.


  1. Drag the following bookmarklet gMapToGPX to your browser toolbar
  2. Visit a site that has a set of Google Maps directions, such as, here's an example
  3. Wait for the map to load, then click the bookmarklet you dragged to the browser toolbar
  4. You'll get a window with the GPX context, select all, copy and paste to a file (named .gpx or .txt) and load into your favorite GPX tool
  5. If you need to convert a GPX to a Garmin TCX, I used