What Is a GPX File? GPX File Type Explained

Someone sends you a hiking trail or a road trip route, and it shows up as a file ending in .gpx. You tap it, and your phone has no clue what to do with it. That’s pretty common, because a GPX file isn’t a photo or a document. It’s a small map file built for GPS apps and devices, so you need the right app to read it.
If you’ve been wondering what are GPX files and why everyone shares them, this guide keeps it simple. It covers what’s inside one, how the GPX file type compares with KML, FIT and TCX, and how to make, open and use your own. Most of it takes about five minutes to get the hang of.
What is a GPX file?
A GPX file is a GPS data file that stores locations as latitude and longitude points. It can hold single points (waypoints), a planned path (a route) or a path someone actually traveled (a track). GPX stands for GPS Exchange Format, and it’s plain XML text, so almost any GPS app or device can read it.
In plain words, a GPX file is a list of places on Earth written in a way that maps can understand. Think of it like a recipe card for a route: the app reads each point in order and draws the line on the map for you.
GPX file type: what the .gpx extension means
The GPX file extension, .gpx, tells your phone or computer that the file holds GPS data in the GPS Exchange Format. The format was first released as GPX 1.0 in 2002, and the current version, GPX 1.1, came out on August 9, 2004 (TopoGrafix). So the GPX file type has been around for more than 20 years, and it hasn’t changed much since.
GPX is an open standard, which means no single company owns it. Any app maker can read and write GPX files for free, and that’s a big reason it’s used by hundreds of programs and web services today. It’s the closest thing the GPS world has to a universal file type.
| Detail | GPX file type |
|---|---|
| Full name | GPS Exchange Format |
| File extension | .gpx |
| Format | Plain text, written in XML |
| First version | GPX 1.0, 2002 |
| Current version | GPX 1.1, released August 9, 2004 |
| Who can use it | Anyone, since it’s an open standard |
| Coordinates | Latitude and longitude in decimal degrees, using the WGS84 datum |
Why so many apps and devices use GPX
Garmin watches, Strava, AllTrails, Google Earth and most hiking and driving apps can all read GPX files. That shared support is the whole point of the format. You can record a drive in one app and open it in another without losing your path, which is handy if you switch phones or apps.
Because a GPX file is just text, it’s also tiny and easy to send. You can email it, drop it in Google Drive or share it in a chat, and the person on the other end gets the exact same route.
What’s inside a GPX file: waypoints, routes and tracks
Every GPX file holds one or more of three kinds of data. Once you know the difference, GPX files make a lot more sense, and you’ll know right away what you’ve been sent.
| Data type | Tag in the file | What it holds | Everyday example |
|---|---|---|---|
| Waypoint | wpt | One named spot on the map | A trailhead, a campsite or the place you parked |
| Route | rte | An ordered list of turn points leading to a place | A planned road trip you haven’t driven yet |
| Track | trk | An ordered list of points describing a path you traveled | The exact road you drove last Saturday |

The official GPX 1.1 schema describes a route as “an ordered list of waypoints representing a series of turn points leading to a destination” and a track as “an ordered list of points describing a path” (TopoGrafix GPX 1.1 schema). A route is where you plan to go. A track is where you really went.
GPX file structure, step by step
A GPX file is built like a set of nested boxes. Each box sits inside a bigger one, and your app opens them in order:
gpxis the outer box that holds everything in the file.metadatais optional and stores the file’s name, author, date and description.wptholds each waypoint, one at a time.rteholds a route, and each turn point inside it is anrtept.trkholds a track, which is split into one or moretrkseg(track segments).trkptholds each track point inside a segment, in the order they were logged.

Every point needs two things: a latitude (lat) and a longitude (lon), written in decimal degrees using the WGS84 datum. Elevation (ele) and time are optional, and all measurements in GPX are metric. Track segments are handy, too. If your GPS signal drops in a tunnel, a new segment starts, so the app doesn’t draw a fake straight line through the hill.
A simple GPX file example
Here’s what a very short track looks like if you open a GPX file in a text editor. It has two points, each with a height and a time stamp:

<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.1" creator="Route Recorder">
<trk>
<name>Drive to the lake</name>
<trkseg>
<trkpt lat="39.7392" lon="-104.9903">
<ele>1609</ele>
<time>2026-11-01T09:15:00Z</time>
</trkpt>
<trkpt lat="39.7401" lon="-104.9915">
<ele>1611</ele>
<time>2026-11-01T09:15:10Z</time>
</trkpt>
</trkseg>
</trk>
</gpx>A real drive has thousands of these points, logged every few seconds. That’s why an hour-long track can still look smooth on the map, while the file stays small enough to email.
GPX vs KML vs FIT vs TCX: which file type do you need?
GPX isn’t the only GPS file out there, and the others can be a bit confusing at first. KML comes from the Google Earth world, while FIT and TCX come from Garmin and the fitness side of things. Here’s how they stack up:
| Format | Made by | Text or binary | Best for | What it can’t do well |
|---|---|---|---|---|
| GPX | TopoGrafix, 2002 | Plain text (XML) | Sharing routes and tracks between any apps and devices | Heart rate and lap data only through add-ons |
| KML | Keyhole, for Google Earth; OGC standard since April 2008 | Plain text (XML) | Showing places, lines and shapes in Google Earth and Google My Maps | Less support on GPS watches and outdoor devices |
| TCX | Garmin, 2007 | Plain text (XML) | Workouts with heart rate and cadence at each point | Fewer apps outside fitness use it |
| FIT | Garmin, 2010 | Binary | Detailed sports data, such as laps, speed and heart rate, in a compact file | You can’t read or edit it in a text editor |
Sources: Decathlon Digital for GPX, TCX and FIT; Wikipedia for KML.

For most people, the choice is pretty simple. Pick GPX when you want a route to work in as many apps as possible. Pick KML when the file is mostly going into Google Earth or My Maps. Leave FIT and TCX for workout data, where heart rate and laps matter more than the map.
Can you convert GPX to KML?
Yes, and it’s usually painless. Both are XML text files that store latitude and longitude, so a route moves from one format to the other without losing its shape. Some apps also save both formats for you, which means you don’t need a converter at all. Route Recorder, for example, exports any trip as GPX, KML or GeoJSON with Premium.
Where GPX files come from and how to create your own
Most GPX files you’ll run into were made in one of three ways. A GPS watch or bike computer logged a workout, someone planned a route on a website and downloaded it, or a phone app recorded a trip as it happened. Trail sites, cycling clubs and road trip blogs often share their routes this way, so a friend can follow the exact same path.
Create a GPX file from your own drive or hike
The easiest way to create a GPX file is to record one. A route recorder app logs your phone’s GPS position every few seconds and saves the whole trip as a track, which you can then export as a GPX file. Our guide on how to record your driving route covers the recording part, including the phone settings that keep it running in the background.
Once the trip is saved in Route Recorder, open Import / Export from the menu and choose Export GPX (a Premium feature; more on GPX and KML export). Save the file to Google Drive, email it to yourself or send it to a friend, and any app that reads GPX can open it.
How detailed the file is depends on how often the app logs a point. Route Recorder’s High Accuracy mode (5 m) gives you the most points and the biggest file, while Battery Saver (30 m) logs fewer points and keeps the file small.
How to open and use a GPX file
To open a GPX file, you need an app that reads GPS data, since the file won’t do much in your photo gallery or a word processor. On a phone, you can import it into Route Recorder for free and see the route on the map. On a computer, Google Earth Pro can show it over satellite images, and any text editor shows the raw XML. For step-by-step help on iPhone, Android, Windows, Mac and Google Maps, see our guide on how to open a GPX file.
Common GPX file problems and how to fix them
GPX files are pretty sturdy, but a few hiccups come up again and again. Most of them take a minute to sort out once you know what’s going on.
| Problem | Likely cause | Fix |
|---|---|---|
| The file won’t open after you edited it | A tag was broken or deleted during the edit | Undo the change, or check that every opening tag has a matching closing tag |
| A straight line cuts across the map | The GPS signal dropped, or the recording app was closed for a while | Record again with the right phone settings, as covered in our driving route guide |
| The route looks a little off the road | Normal GPS drift of a few meters, worse near tall buildings | Record with High Accuracy mode next time |
| No times or heights show up | Those fields are optional, so the app that made the file skipped them | Use a file from an app that saves the time and height of each point |
Conclusion: GPX files make your routes portable
A GPX file is a plain-text list of GPS points that almost every map app and GPS device can read. It can hold waypoints, planned routes or the tracks you actually traveled, and since it’s an open standard, your routes aren’t locked into any one app. That’s why it’s still the go-to GPS file type more than 20 years after it first came out.
If you want GPX files of your own drives and trips, Route Recorder handles both sides in one app. Record the trip, then export it as GPX, KML or GeoJSON with Premium. When someone sends you a route, import it for free and see it on the map before you head out.
Try it on your next trip. Download Route Recorder for iPhone or Android and save your first GPX file today.
GPX file FAQs
1. What does GPX stand for?
GPX stands for GPS Exchange Format. It’s an open standard for sharing GPS data between apps, devices and websites.
2. What are GPX files used for?
People use them to share hiking trails, cycling routes and road trips, to load routes onto GPS devices, and to keep a record of where they’ve been.
3. Is a GPX file safe to open?
A GPX file is plain text with map points, so it can’t run anything on its own. Still, only open files from people and sites you trust.
4. What’s the difference between a GPX route and a GPX track?
A route is a planned list of turn points leading to a place. A track is the actual path someone traveled, logged point by point.
5. Is GPX or KML better?
GPX works in more GPS apps and devices, so it’s better for sharing routes. KML is better for Google Earth and Google My Maps.
6. How do I create a GPX file?
Record a trip with a route recorder app, then export it. In Route Recorder, open Import / Export and choose Export GPX (Premium).
7. Can I edit a GPX file?
Yes. It’s plain XML, so you can change names and details in any text editor. Be careful with the tags, though, since one broken tag can stop the file from opening.
8. Why is my GPX file so big?
Long tracks logged every second can hold many thousands of points. Recording with a lower accuracy setting, such as Battery Saver, keeps the file smaller.
