How GPX Files Work — A Beginner's Guide
Published: August 2026 · 6 min read
If you record GPS data — whether with a bike computer, a running watch, a smartphone app, or a sim-racing tool — you have almost certainly encountered a GPX file. GPX stands for GPS Exchange Format. It is an open, XML-based standard for storing and sharing GPS data such as tracks, routes, and waypoints.
Despite being the most universal GPS format, many people struggle with GPX files because they do not understand the structure. Knowing just a few basics can save you hours of frustration when a file will not import into your favourite platform.
What's inside a GPX file?
If you open a GPX file in a text editor, you will see XML. The file has three main types of elements:
- Waypoints (
<wpt>) — single latitude/longitude points with optional name, elevation, and time. Think "point of interest" — a summit, a junction, a start/finish marker. - Routes (
<rte>) — an ordered list of waypoints that form a planned path. A route is what you might create in a route planner before you ride — "go from A to B via C, D, and E." - Tracks (
<trk>) — the actual path you travelled, recorded by a GPS device. A track contains one or more track segments (<trkseg>), each of which contains a series of track points (<trkpt>). Every track point records a timestamp, latitude, longitude, and optionally elevation, speed, heart rate, or power data.
For most athletes, the track (<trk>) is what matters. It is the digital record of where you went and when.
Why timestamps are essential
A track point looks like this:
<trkpt lat="51.5074" lon="-0.1278"> <ele>11.5</ele> <time>2026-08-01T10:05:30Z</time></trkpt>
The <time> element is optional in the GPX specification. A file can be 100% valid GPX XML with perfectly correct coordinates and elevations — and still have zero timestamps. And that is exactly the problem.
Fitness platforms like Strava, Garmin Connect, and TrainingPeaks use timestamps to compute pace, speed, and moving time. When timestamps are missing, these platforms refuse the file entirely. You get the dreaded "Time information is missing from file" error.
This is the single most common cause of GPX import failures, and the reason the Timestamps tool in GPX Tools exists. It synthesizes timestamps from a constant speed or target duration, distributed proportionally by distance so the resulting pace is physically consistent with your GPS trace.
Track segments and lap boundaries
GPX allows multiple <trkseg> elements inside a single <trk>. Each segment is essentially a continuous section of motion. When you pause your GPS recording, many devices start a new segment. This makes segments a natural way to represent laps.
However, most GPS devices just record everything as one long segment. That is where the Lap Detector comes in — it analyzes the track for start/finish crossings and splits it into per-lap segments, giving you individual lap times, distances, and speeds.
Need to fix a GPX file? Drag it into GPX Tools — everything runs in your browser, no uploads.
Try GPX Tools →Why understanding this matters
Once you know what a GPX file contains, you can diagnose problems yourself. Is your file missing timestamps? Open it and search for <time>. Is it one giant segment when you wanted separate laps? Check how many <trkseg> blocks you see. Is the point count too high for your device? Count the <trkpt> elements.
And when you do run into trouble, you will know exactly which tool to reach for — the Lap Replicator to multiply a single lap, the Lap Detector to split a recording into laps, or the Timestamps tool to fix time data.
← All articles · Read next: GPX vs TCX vs FIT