What Is a GPX File? GPX File Type Explained

GPX file icon next to a laptop map showing a recorded route

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.

DetailGPX file type
Full nameGPS Exchange Format
File extension.gpx
FormatPlain text, written in XML
First versionGPX 1.0, 2002
Current versionGPX 1.1, released August 9, 2004
Who can use itAnyone, since it’s an open standard
CoordinatesLatitude 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 typeTag in the fileWhat it holdsEveryday example
WaypointwptOne named spot on the mapA trailhead, a campsite or the place you parked
RouterteAn ordered list of turn points leading to a placeA planned road trip you haven’t driven yet
TracktrkAn ordered list of points describing a path you traveledThe exact road you drove last Saturday
Map comparing a GPX waypoint, a planned route and a recorded track

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:

GPX file structure with gpx, trk, trkseg and trkpt tags nested inside each other

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:

Example GPX file in a text editor showing two track points with time and elevation
<?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:

FormatMade byText or binaryBest forWhat it can’t do well
GPXTopoGrafix, 2002Plain text (XML)Sharing routes and tracks between any apps and devicesHeart rate and lap data only through add-ons
KMLKeyhole, for Google Earth; OGC standard since April 2008Plain text (XML)Showing places, lines and shapes in Google Earth and Google My MapsLess support on GPS watches and outdoor devices
TCXGarmin, 2007Plain text (XML)Workouts with heart rate and cadence at each pointFewer apps outside fitness use it
FITGarmin, 2010BinaryDetailed sports data, such as laps, speed and heart rate, in a compact fileYou can’t read or edit it in a text editor

Sources: Decathlon Digital for GPX, TCX and FIT; Wikipedia for KML.

Comparison of the GPX, KML, FIT and TCX GPS file types

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.

ProblemLikely causeFix
The file won’t open after you edited itA tag was broken or deleted during the editUndo the change, or check that every opening tag has a matching closing tag
A straight line cuts across the mapThe GPS signal dropped, or the recording app was closed for a whileRecord again with the right phone settings, as covered in our driving route guide
The route looks a little off the roadNormal GPS drift of a few meters, worse near tall buildingsRecord with High Accuracy mode next time
No times or heights show upThose fields are optional, so the app that made the file skipped themUse 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.

Download on the App StoreGet it on Google Play

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.