What Is Gpx Featured
play video
How to Hike

What is a GPX File?

A GPX file, also known as a GPS Exchange Format file, is simply a text file with geographic information such as waypoints, tracks, and routes saved in it. You can use GPX files to transfer that information between GPS units and computers. In this article, I'm going to demystify the GPX file in non-tech language so that you can use them effectively. I'll also answer some common questions such as "what is the difference between a route and a track?"

In this Guide:
  • Understanding What's In the GPX File
  • Should I Use Routes or Tracks?
  • How to Open or Create a GPX File
  • The Best GPX Tools (free)

What's in a GPX File?

Inside Of Gpx File
Here's what a GPX file looks like if you open it up. It might look crazy now, but if you know what to look for, you'll be able to decode it and understand what you're looking at.

If you open up a GPX file, you'll see that it's simply a text file. You can open a GPX file with any text editor or word processor. There are also more sophisticated tools that offer mapping and are easier to work with, and I'll talk about those later. The GPX file was specified in the text format so that any type of device could easily open and read it without a fuss.

Gpx File Outline
Think of the GPX file like a bulleted outline containing your GPS information. Information that is indented belongs to the higher level bullet point.
Gpx File Indentation
Instead of plain text like the last image, the GPX file is written in XML (eXtensible Markup Language). The XML data is indented just like our bulleted list is, and has the same information, but just in the XML format.

If you open a GPX file with a text editor and it's not formatted nicely like this or is all on one line, just cut and past it into a tool like and XML formatter, process it, and then paste it back to your file. Sometimes programs remove all the white space from the GPX file to reduce the file size. GPS Units just look for the XML language in the file and don't care about the whitespace, although most programs will save it with the indentations to make it easier for humans to work with.

Gpx File Tags
Each piece of information in a GPX file is surrounded by tags. The tags tell the reader (whether a GPS unit or computer) what information is contained between it. The tags always are between a "<" and ">".

GPX Tag Naming Standards

Gpx File Documentation
The tag names in your GPX file are all predefined and documented online. These are some of the naming standards for a waypoint (more later). If you don't use the tags the way they are specified here (e.g. using <waypoint> instead of <wpt>) it will not work.

The GPX file format is called an "open standard" meaning that it can be used on any device for free regardless of brand. In order for that to work, there has to be standard tag names within the GPX file. Those standard tag names were first established in 2002, and then updated in 2004 with the latest version of GPX, GPX 1.1.

Save GPX files in the latest version, GPX 1.1, if you are given an option.

You can take a look at (the very dry) different types of information that a GPX file can have here, but there are only a few big ones that you need to know about: waypoints, routes, and tracks.

Understanding Latitude and Longitude in Your GPX File

Getting Gpx Fix
When I look at this position fix on my GPS, it's saying that the accuracy is 17ft. But if I crack open the actual GPX file from here, it will likely indicate that my position is accurate down to an atom or electron, which is obviously wrong. Since your position is the building block of all the geographic data in the GPX file, it's important to understand the numbers that you're looking at.

Before I show you the GPX file data for a waypoint, we need to talk about latitude and longitude. In a GPX file they are stored in WGS 84 format, which is a mapping reference system created by the U.S. Department of Defense for GPS. You can simplistically think of it as a decimal equivalent of the latitude and longitude that you learned about in school (and you convert between them with this tool). For example, a coordinate in WGS 84 is -77.508333, and in traditional latitude would be S 77° 30' 29.9988"  (degrees minutes seconds).  Any unit that uses the GPS satellites will expect the GPX data in this WGS 84 format.

The Russian GPS system, GLONASS, uses a different mapping system, PZ-90. The European GPS system, Galileo, uses one called GTRF. Even if your GPS unit supports receiving those signals, your GPX file will still use the WGS 84 decimal units.

The number of decimal units (to the right of the decimal point) determines the accuracy of the waypoint. When you are recording a waypoint in the field on your GPS device, the accuracy is based on your GPS fix. This table will let you decode the decimal points in your waypoint and determine how precise it is (but if the GPS is not that accurate, it can also be an incorrect GPS fix while still appearing to be precise).

Decimal Places ExamplePrecision
40.0001Individual street or land parcel
50.00001Individual trees
60.000001Individual Person
70.0000001 Practical limit of commercial surveying
80.00000001Specialized surveying such as tectonic plate mapping
Gpx Decimal Precision Errors
According to my Garmin GPS, I can position myself down to the electron in an atom.

But wait! If you've looked at the values in your GPX file, you'll notice that the decimal value is much longer than that, often greater than 13 decimals on Garmin units. 13 decimals of latitude precision would be about the width of a row of 100 silicon atoms. I'm not privy to Garmin's engineering secrets but I suspect it's based on a division calculation done in the unit to generate the latitude and longitude. They just dump all decimals from the mathematical operation in there instead of rounding up to a practical precision point such as 5 or 6 decimal places.

So the takeaway here is that in the GPX file you are looking for 5-6 decimal places of latitude and longitude accuracy to make sure that you're on a trail. Anything more is waste and anything less is not accurate enough.

Most consumer GPS units are accurate from 10-50 feet depending on the fix. You can also spend thousands of dollars and get a professional GPS that is accurate to a few centimeters. If you really need a good waypoint fix, try waypoint averaging (as seen on the GPSMAP 66i here).

Waypoint Averaging
If you really need a good position fix and don't want to invest thousands on a professional GPS, look for a waypoint averaging function on your GPS that takes multiple fixes and then averages the position based on them.


Gpx Waypoint Device
Waypoints are the most basic piece of geographic data in the GPX file. The minimum information that you need to have for a waypoint is latitude and longitude. Every piece of geographic data (waypoints, routes, and tracks) in your GPX file is based on a latitude and longitude coordinate.
Gpx Waypoint
You can pick waypoints out in your GPX file by looking for information between the <wpt> and </wpt> tags.

While the minimum information for a waypoint is latitude and longitude, you need a few more pieces of information if a waypoint is really going to be useful. Most GPS units will allow you to additionally specify these fields:

Custom Marker Symbols On Gps Device
Custom waypoint images usually don't transfer between brands and sometimes even units. Here's some options for waypoint markers on my GPSMAP 66i.

There are a total of 19 data properties that you can add to a waypoint. Most of the ones I haven't mentioned are not used much and include technical elements like magnetic variation and satellite fix type.


This is a good time to mention a group of tags that you might see in a GPX file called "extensions." When the GPX format was specified, they realized that there might be extra data specific to a GPS unit or manufacturer that needed to be stored. So they created a freeform section called "extensions" where everything between the <extension> and </extension> tag can be anything.

Gpx Trackpoint Extension
Here are some track point extensions (temperature and heart rate) added by my Garmin Fenix watch.

Extensions are usually only read by the manufacturer who put them in. So if you have a TomTom GPS, it probably doesn't read Garmin GPX extensions, and vice-versa. You can see a (very dry) list of all of the Garmin GPX extensions here to get an idea of what's available. Extensions can be used with any entity in a GPX file including waypoints, tracks, and routes.

Here are some examples of extensions from Garmin:

And to make it even trickier, there are some extensions that are device-specific and are not documented. Just know that anything you see under "extensions" will be brand and/or device-specific and probably won't transfer well between different brands or devices.


Gps Start Track
Most GPS units will record your track by getting a GPS fix (like a waypoint) every few seconds.

The easiest way to think of a track is like a chronological breadcrumb trail of waypoints. Between each track point is simply a straight line. Generally tracks are created when you record your activity on a GPS. Some GPS units let you specify how often it should take a track point. The more track points you take, the more accurate your track (and also the more you drain your battery).

Many Garmin GPS units offer "smart recording" or "every second recording" (or some variation of those). "Smart recording" only drops a track point when you change direction, speed, elevation, or heart rate. "Every second recording" does what it says. Unless I'm in a situation where I am really trying to conserve battery, I always use "every second recording" to get a track with more fidelity.

Creating A Gpx Track
You an also create tracks using different mapping software such as CalTopo and Garmin Basecamp. The track will not be "real" in the sense that it did not actually record you on the path, but from a technical perspective, it will be (basically) the same.

You can find tracks in your GPX file by looking for everything between the <trk> and </trk> tags. Within the track you'll find many <trkpt> tags with the individual track points, which you can think of as waypoints. That's a track at it's most basic.

Gpx Track
Although at a minimum a track (<trk>) needs track points (<trkpt>), although there is often much more information in there.

Most GPS units and mapping software will add optional track data tags to a track in order to make it more descriptive. There are 21 optional tags for track points, and some common tags that you'll encounter are:

You don't need a map to follow a track. You're either on the line or you're not.

Active Tracks & Saved Tracks

Gpx Saving Track
Many GPS units work like a trip odometer on a car. You need to reset them between each trip. Unlike a car, you can usually save your information as a track that you can then transfer back to your computer.

Many Garmin outdoor GPS units have two types of tracks: active and saved. An active track is the track points for your current activity, usually seen and tracked on the trip computer screen. If you want to save the track and get it off your device as a GPX file, you have to save the track. Each GPS unit is different, but generally if you don't save it, it won't be available to transfer off a device as a GPX file.


Gps Calculating Route
GPX routes are calculated by and on your GPS device or computer.

If you think of tracks as detailed breadcrumb trails between point A and point B, a route is simply point A and point B, without any information in between. You can also think of it as an itinerary of waypoints. First I want to visit the Eiffel Tower, then the Louvre, and then the Arc de Triomphe. Those points are in the route, but it's up to my GPS device to get me from one attraction to the next. Generally a GPS will alert you when you arrive at each point along the route and when there is a significant navigation change such as a turn or intersection.

Gpx Route Turn Alert
My GPS is alerting me that I should turn right at this intersection. The intersection was not one of the points on my route, but the GPS knows from the maps that there is a turn worth alerting me about.
Gpx File Route
Routes generally have far less information in them because the GPS or computer is filling in the blanks in between route points. Everything between the <rte> and </rte> tags specifies the route. In this case I'm starting at the Ortega Oaks Candy Store, heading to the San Juan Trail, and ending up at Sugarloaf Peak. It's up to my GPS to route me between each one of those points.

If you look at a route in your GPX file, these are the tags:

Gpx Shaping Points
Routes can have extensions just like waypoints and tracks. Here's some custom extension data from a Garmin route. In this case, all of the additional <gpxx:rpt> Garmin extension tags are shaping points, which help the Garmin GPS stick to the route that I had planned out in Garmin Basecamp.  So in some ways Garmin is creating pseudo-track points to make sure that when my route transfers to the device, the GPS routing doesn't mess up by sending me on the interstate.

Now to add a wrinkle into that, routes can include significant turns and landmarks on the way. These are called "shaping points" in the Garmin world and are treated just like points along the route to keep you on a planned route, but the GPS will not alert you when you pass along a shaping point. Shaping Points are an extension within the GPX file. Regardless of how many via points or stops you have between the start of the route and the finish, it's up to the device to get you from each landmark on the route.

Gpx Shaping Point Alert
If you plan a route in Garmin Basecamp, you can specify whether you want a point on a route to be a stop (you'll get an alert that you've arrived), or a "via point" with no alert, which basically means you want to travel by passing over that point.

Shaping points and via points are the same thing.

How GPX Routing Works

Gps Routing Options
GPS units will usually allow you to specify how you'd like it to calculate the route.

I mentioned earlier that the device (whether GPS, smartphone, or computer) will "fill in the blanks" between the different route points to give you directions. And since there are usually multiple ways to get from A to B, GPS units usually have options on how to route you. If you ever use Google Maps or Waze for driving directions, you see this routing concept in action all the time as they (automatically) route you from A to B around traffic and slow-ups.

One of the simplest routing options offered by almost every GPS is "straight line" which is what it says. It will route you across land, water, lava, whatever between A and B. On the water it's great, but if you're using a route anywhere else, not always the best option.

Other options include things like "shortest distance," "shortest time," and "most popular." They all will route you on roads or trails, but they depend on having those (routable) roads and trails on the actual GPS unit. Routable roads and trails are usually found on maps that you can load on the device (or ones that have been preloaded). But it's important to not that not all maps are routable. If you are loading new or custom maps onto a GPS, you must make sure they are labeled as "routable" if you want to use them in route calculations. Otherwise the unit will default to straight lines.

Free Osm Maps
Good news - high-quality routable topographic maps are available for free courtesy of the Open Street Maps project.

Most GPS units come with some sort of routable maps on them. For example, Garmin TopoActive maps which come bundled on units like the Fenix 6x, GPSMAP 66i, and eTrex 32x are all routable. You can also download free routable Open Street Maps (OSM) for your GPS. OSM maps  are community-sourced and generally have more trails (including small and overgrown) on them.

If you are a Garmin user, I wouldn't buy maps from them if they didn't come free with your GPS unit already. Garmin TopoActive maps are based on the OSM map data. They're a little prettier, but otherwise not worth your money.

Should I Use a GPX Route or Track?

First off, just a reminder that this is a hiking website so I'm going to focus on using routes and tracks on the trails here. If you are navigating in a car, walking streets, or on the water, just use a route (as you would when you use something like Google Maps).

Note that routes don't take anything like beauty or current trail conditions into account when plotting the course between route points. It's just a cold, hard, computer calculation. I generally use routes when:

Following Gps Track
When you navigate by GPX track, you're either on the track, or you're not. Some GPS units will alert you when you are not on the track.
Following Gps Route
When you follow a GPX route, you will get turn-by-turn prompts at trail junctions and major direction changes, just like you would when driving. For hiking I find this is a bit too much. But if I'm running and don't necessarily want to focus on navigation, having the GPS tell me what to do is okay.

FYI When hiking in the backcountry I always use GPX files in conjunction with paper maps. Generally my workflow is to plan out a hike on the computer and paper map by researching the area, landmarks, and conditions. Then I create a GPX and send to my GPS unit(s). When I'm actually on the trail, I use the paper map and my knowledge of the route (from planning) to make navigation decisions. If I am ever unsure of my location, I consult my GPS with the GPX track and see where I am in relation to my planned GPX track.

How Do I Open a GPX File?

Gpx Opening In Garmin Basecamp
There are many ways to open a GPX file but I find that the free Garmin Basecamp program allows me to work with them in a comprehensive way. There's no perfect tool though, so I use a combination of a few.

Since everyone has a different workflow and preferences, and there are dozens of pieces of software and web apps to work with GPX files, just note that these are the tools that work best for me. I encourage you to play around with different tools and see what works best for you.

How to Get GPX Files

If you're eager to get your hands on some GPX files to help you on your new hike, there are a few places you can look.

How to Create a GPX File

Creating Gpx On Gaiagps
GaiaGPS is a slick tool for creating GPX routes. In this screenshot I'm overlaying a precipitation forecast on top of a National Geographic map and creating a route. It also has a cool elevation plot as I create the route.

There are a ton of ways to create GPX files, and you could even theoretically write your own text file using Notepad, but that would be painful. Here are my tips for creating GPX files before your hike.

A runner up is Garmin Basecamp, which does tracks, routes, and waypoints well, but lacks the depth of data layers that the other tools do. I wish I could overlay weather, etc. in Basecamp, but you can't.

Now you can also record tracks on your GPS route and save them. Each GPS and brand is a little different and it's beyond the scope of this article to cover them all, but it's easy enough to read the manual and figure it out. I have a guide to creating hiking routes and sending them to your Garmin GPS here.


Here are some odds and ends about GPX files and GPS that folks have asked me over the years. If you have a question that I haven't covered, contact me and I'll do my best to answer it.

Who uses the GPX file format?

Pretty much anyone who offers a GPS unit, app, or software will support the GPX file format. That includes Garmin, Suunto, TomTom and Magellan.

What is the GeoJSON file format?

You might see options to get tracks in GeoJSON format.  GeoJSON is a new format with these differences:

GeoJSON files are not generally compatible with or readable by GPS units, especially older ones.

What is the KML file format?

You might also see options to download a KML file, which stands for Keyhole Markup Language, and was developed to save Google Earth data. KML can contain the same elements as a GPX file but was intended to store mapping presentation and annotation data. Most GPS units don't read KML.

My Garmin Has FIT and TCX Files, should I use them instead of GPX?

TCX and the newer FIT file format are proprietary to Garmin and contain essentially the same information as a GPX file. Unlike a GPX file, which doesn't natively have support for things like heart rate (without using GPX extensions), TCX and FIT files are more sports oriented and do have that type of data. They are often used to share courses for running and cycling.

How many waypoints, tracks, and routes can I store on my GPS?

It depends on the GPS unit that you're using and you can usually find the answer on the support site for a brand. For example, here's the limits for the GPSMAP 66 series on the Garmin support site. If you use a GPS app on your smartphone the limit is usually based on your phone's storage.

What if my map is not WGS84?

This can get a little tricky, but the thing to remember is that in the GPX file, the latitude and longitude should always be in WGS 84 format, regardless of what your map is encoded in or what types of units you look at on the screen. For most Garmin units you have these three settings (usually deep down in the settings).

Keeping everything in WGS84 format will minimize battery drain and keep things running smoothly.

Who built GPS?

The U.S. Department of Defense launched the GPS system and it became fully operational in 1993. It's free for anyone to use, but the government can selectively turn off service for regions or degrade the performance globally. Today GPS is managed by the US Space Force. Since this crucial tool is controlled by the US military, other countries like India have developed their own satellite positions systems. Newer GPS units can receive position signals from some of these newer systems.

That's a lot of junk in space!

Should I use GPS / GLONASS / Galileo to record my GPX tracks?

People get passionate when it comes to this subject, and there's not a clear answer. For me GPS and Galileo seems to provide the best results. But for others, GPS and GLONASS works well. I recommend just trying out the combinations in your area. Not that receiving from multiple satellite networks will drain your battery about 5-10% more (my experience with various Garmin units), and GPS alone can work well too.

What is WAAS and should I use that?

WAAS (Wide Area Augmentation System) is simply stated a data update to address any GPS satellites that may have slightly changed course or speed. It's another signal that your GPS unit can receive from the GPS satellites that contains the correction information. So your GPS unit takes that correction information and applies it to any satellites that need to be corrected. If you want a more precise read, use WAAS. If you want to save battery, turn it off.

Basic GPS Concepts in Use

Need More Info?

This Guide Was Written by Cris Hazzard

Cris Hazzard 4 Mile Trail Yosemite
Hi, I'm Cris Hazzard, aka Hiking Guy, a professional outdoors guide, hiking expert, and author based in Southern California. I created this website to share all the great hikes I do with everyone else out there. This site is different because it gives detailed directions that even the beginning hiker can follow. I also share what hiking gear works and doesn't so you don't waste money. I don't do sponsored or promoted content; I share only the gear recommendations, hikes, and tips that I would with my family and friends. If you like the website and YouTube channel, please support these free guides (I couldn't do it without folks like you!). You can stay up to date with my new guides by following me on YouTube, Instagram, or by subscribing to my monthly newsletter.