A GPX file stores location data — coordinates, routes, and waypoints — in a format that works across different mapping and GPS apps

GPX stands for GPS Exchange Format. It is a text-based file that holds geographic information: latitude and longitude coordinates, elevation, timestamps, and sometimes names or descriptions. Think of it as a container that lets you move location data between different programs without losing the information.

The most common use is storing a route or trail you have walked, driven, or cycled — the GPX file records the path you took. You can also use GPX files to mark specific points (called waypoints) on a map, like the location of a restaurant or a hiking trailhead. Because GPX is a standard format, a file created in one app like Garmin BaseCamp will open in another app like Google Earth or AllTrails.

Key Takeaways

  • A GPX file is a text document that stores GPS coordinates, routes, and waypoints in a format that works across different mapping apps.
  • You create a GPX file by recording a route with a GPS device or smartphone app, or by downloading one from a website that shares trails and routes.
  • GPX files are useful for sharing hiking trails, cycling routes, or driving directions with other people without needing them to use the same app you do.
  • You open a GPX file by importing it into a mapping or GPS app on your phone, computer, or dedicated GPS device.

How GPX files are created

A GPX file is usually created in one of three ways. The first is by recording a route in real time using a GPS device or a smartphone app. Apps like Strava, AllTrails, or Komoot record your location as you move and save that path as a GPX file when you finish. Dedicated GPS devices like Garmin handhelds do the same thing.

The second way is by downloading a GPX file from a website. Sites like AllTrails, Komoot, and OpenStreetMap let users share routes and trails as GPX files. You download the file to your phone or computer, then open it in a mapping app.

The third way is by creating waypoints manually in a mapping app or GPS software. You mark specific locations on a map, name them, and save the collection as a GPX file. This is less common for everyday users but useful if you are planning a trip and want to mark stops in advance.

What information a GPX file contains

A GPX file is a text file, so if you open it in a text editor like Notepad, you will see readable code. The file contains latitude and longitude coordinates, usually recorded many times per minute if it is a recorded route. It also includes elevation data if your GPS device or app captured that information.

For recorded routes, the file includes timestamps — the exact time each coordinate was recorded. For waypoints, it includes the name and description you gave that location. Some apps add extra information like heart rate, temperature, or speed, though not all mapping programs will read that data.

The file itself is small. A recorded hiking route that is several miles long might be 50 to 200 kilobytes, so GPX files are easy to email, text, or store.

How to open and use a GPX file

To use a GPX file, you import it into a mapping or GPS app. On a smartphone, you download the GPX file, then open it with an app like Google Maps, Apple Maps, Komoot, AllTrails, or Strava. The app reads the file and displays the route or waypoints on a map.

On a computer, you can open a GPX file in mapping software like Google Earth, Garmin BaseCamp, or CalTopo. You can also view it in a web browser using sites like GPXViewer or Garmin's online tools — just upload the file and the site displays the route on an interactive map.

On a dedicated GPS device like a Garmin watch or handheld, you connect the device to a computer, transfer the GPX file to the device's storage, and the device displays the route. You can then follow the route using the device's navigation features.

Why GPX files matter for sharing routes

The main advantage of GPX is that it is a standard format. If a friend records a hiking trail using Strava and sends you the GPX file, you can open it in AllTrails, Google Maps, or any other app that reads GPX. You do not need to use the same app your friend uses.

This makes GPX the best way to share routes and trails with other people. Instead of describing a route in words or trying to recreate it in your own app, you can send a single file that contains the exact path, elevation, and waypoints. The person receiving the file can follow it on whatever device or app they prefer.

GPX files are also useful for backing up routes. If you record a route in an app and that app shuts down or you switch to a different one, you can export the route as a GPX file and import it into your new app. The route data is preserved even if the original app is no longer available.

GPX vs. other location file formats

GPX is the most common format for sharing routes and waypoints, but other formats exist. KML (Keyhole Markup Language) is used by Google Earth and Google Maps. TCX (Training Center XML) is used by Garmin for fitness data and includes heart rate and cadence information. FIT is Garmin's proprietary format for fitness watches and devices.

For most everyday uses — sharing a hiking trail, storing a cycling route, or backing up waypoints — GPX is the best choice because it works across the widest range of apps and devices. If you are working with fitness data like heart rate or cadence, TCX or FIT might be more appropriate, but those formats are less widely supported.

Common issues when working with GPX files

The most common problem is that a GPX file will not open in an app. This usually happens because the app does not support GPX, or the file is corrupted. Check the app's documentation to confirm it reads GPX files. If the file is corrupted, try downloading it again or exporting it again from the original source.

Another issue is that a route displays incorrectly — the path looks wrong on the map, or waypoints are in the wrong location. This usually means the GPS data was recorded with poor signal, which causes inaccurate coordinates. The route may still be usable, but it might not be perfectly precise.

Some apps also add their own data to GPX files when you export them, which can cause compatibility issues with other apps. If you are sharing a GPX file with someone else, export it from a neutral app like Google Earth or a web-based GPX viewer to avoid extra data that might confuse their app.

Frequently Asked Questions

Can I edit a GPX file after I download it?

Yes. You can open a GPX file in a mapping app or web tool and add, remove, or move waypoints. Some apps like Komoot and CalTopo let you edit routes directly in the app and save the changes back to the GPX file. You can also edit the raw text in a text editor, but that requires understanding the GPX format.

Is a GPX file the same as a map?

No. A GPX file contains only location data — coordinates and waypoints. It does not include the map itself, the terrain, or satellite imagery. When you open a GPX file in an app, the app displays the data on top of its own map. Different apps will show the same GPX file on different map backgrounds.

Can I use a GPX file offline?

It depends on the app. Some apps like Komoot and AllTrails let you download maps for offline use, then follow a GPX route without an internet connection. Other apps require an internet connection to display the map. Check your app's settings to see if offline maps are available.

What if someone sends me a GPX file and I do not know what app to use?

Google Maps and Google Earth are free and work on most devices. Download the GPX file, then open it with Google Maps on your phone or Google Earth on your computer. Both will display the route or waypoints without requiring any special setup.