Premium Sample GPX Files

Sample GPX File Download

Professional GPS Exchange Format data for mapping, fitness, and navigation testing. High-quality .gpx samples optimized for universal device compatibility and GIS analysis.

Download by Size (10KB - 1MB)

Need a specific file size for load testing or benchmarking? Download automatically generated dummy files in exactly the size you need without previewing.

10 KB

Small sample for basic testing

100 KB

Medium sample for throughput testing

1 MB

Large sample for benchmark testing

Standard & Complex GPS Data Collections

Scenic Hiking Track (Blue Ridge)

A high-resolution GPS track recording of a mountain hike including elevation (ELE) and precision time markers.

<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.1" creator="MergeTool" xmlns="http://www.topografix.com/GPX/1/1">
  <metadata>
    <name>Blue Ridge Ridge-line Hike</name>
    <desc>A recorded track for testing elevation parsing and velocity calculation.</desc>
    <time>2024-03-27T10:00:00Z</time>
  </metadata>
  <trk>
    <name>Main Ridge Trail</name>
    <trkseg>
      <trkpt lat="35.5951" lon="-82.5515"><ele>640.2</ele><time>2024-03-27T10:00:00Z</time></trkpt>
      <trkpt lat="35.5955" lon="-82.5520"><ele>645.5</ele><time>2024-03-27T10:01:00Z</time></trkpt>
      <trkpt lat="35.5960" lon="-82.5525"><ele>652.1</ele><time>2024-03-27T10:02:00Z</time></trkpt>
      <trkpt lat="35.5964" lon="-82.5532"><ele>658.9</ele><time>2024-03-27T10:03:00Z</time></trkpt>
    </trkseg>
  </trk>
</gpx>
UTF-8 GPX

Urban Cycling Route (Planned)

A precision-planned bicycle route through several city waypoints for bike computer and navigation engine testing.

<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.1" creator="MergeTool" xmlns="http://www.topografix.com/GPX/1/1">
  <rte>
    <name>San Francisco Loop</name>
    <rtept lat="37.7749" lon="-122.4194"><name>Start: Market Street HQ</name></rtept>
    <rtept lat="37.7833" lon="-122.4167"><name>Checkpoint: Union Square</name></rtept>
    <rtept lat="37.7594" lon="-122.4174"><name>End: Mission District Park</name></rtept>
  </rte>
</gpx>
UTF-8 GPX

Tourism POIs Waypoint Bundle

A collection of Points of Interest (POIs) with specialized names and cultural descriptions for map markers.

<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.1" creator="MergeTool" xmlns="http://www.topografix.com/GPX/1/1">
  <wpt lat="40.7484" lon="-73.9857">
    <name>Empire State Building</name>
    <desc>Global cultural icon and architectural masterpiece.</desc>
  </wpt>
  <wpt lat="40.7580" lon="-73.9855">
    <name>Times Square</name>
    <desc>The world's most visited tourist attraction.</desc>
  </wpt>
  <wpt lat="40.7812" lon="-73.9665">
    <name>Central Park South</name>
    <desc>Urban landscape and recreational park.</desc>
  </wpt>
</gpx>
UTF-8 GPX

Complex Multi-Segment Activity

A file containing multiple distinct segments and tracks, testing how parsers handle internal schema breaks.

<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.1" creator="MergeTool" xmlns="http://www.topografix.com/GPX/1/1">
  <trk>
    <name>Leg 1: Run</name>
    <trkseg><trkpt lat="51.5074" lon="-0.1278"><ele>15.0</ele></trkpt></trkseg>
  </trk>
  <trk>
    <name>Leg 2: Walk</name>
    <trkseg><trkpt lat="51.5080" lon="-0.1285"><ele>16.2</ele></trkpt></trkseg>
  </trk>
</gpx>
UTF-8 GPX

Mountain Summit Survey Markers

Professional elevation markers and lat/long coordinates for mountain surveying and peak-bagging logs.

<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.1" creator="MergeTool" xmlns="http://www.topografix.com/GPX/1/1">
  <wpt lat="46.8523" lon="-121.7603">
    <ele>4392</ele>
    <name>Mount Rainier</name>
    <sym>Summit</sym>
  </wpt>
  <wpt lat="44.0372" lon="-121.7699">
    <ele>3157</ele>
    <name>South Sister</name>
    <cmt>Testing elevation data accuracy</cmt>
  </wpt>
</gpx>
UTF-8 GPX

GPX: The Industry Standard for Geographic Data

GPX (GPS Exchange Format) is a lightweight, XML-based data schema for the interchange of geographic data (waypoints, routes, and tracks) between software applications and GPS devices. It serves as the universal language for outdoor navigation, sports tracking, and logistics mapping.

Technical Advantages of the GPX Format

Since its inception by Topografix, GPX has become the de facto standard because of its flexibility. It allows for the storage of not just coordinates (Latitude and Longitude), but also altitude, time, and heart rate data, making it essential for modern fitness apps like Strava and Garmin Connect.

  • Open XML Standard: Easily readable by any XML parser, making it developer-friendly and future-proof.
  • High-Precision Metadata: Supports WGS84 datum, ensuring that your tracks and waypoints align perfectly with global mapping standards.
  • Universal Compatibility: Works natively with Google Earth, QGIS, ArcGIS, and specialized outdoor GPS devices (Garmin, Suunto, etc.).

For deep technical specifications, refer to the Topografix GPX Reference Guide or explore the GPX historical background .

GPX Processing Platform

Downloaded your datasets? Use our 100% browser-based tools to merge multi-day tracks into a single continuous route or convert GPS data without ever uploading sensitive location info to a server.

GPS Industry Test Scenarios

Fitness App Integration

Use our Hiking Track sample to test how your dashboard handles varying Elevation (ELE) and speed calculations over time.

Route Navigation Logic

Ensure your navigation engine correctly loops through RTEPT markers in the Cycling Route sample for turn-by-turn prompts.

GIS & Map Visualization

Test specialized SYM (symbol) and CMT (comment) rendering logic in your map viewers using our Summit Survey markers.

GPX File Format Specifications

The table below covers every technical detail about the GPX format, from the official MIME type used when serving files over HTTP to the Topografix namespace that validates your document structure.

PropertyValue
File Extension.gpx
MIME Typeapplication/gpx+xml
Base FormatXML (eXtensible Markup Language)
Coordinate SystemWGS84 datum (latitude and longitude in decimal degrees)
Max Recommended SizeUnder 50 MB for device loading; split large tracks by date
Creator / Governing BodyTopografix (Dan Foster and Matt Felheim)
Official SpecificationGPX 1.1 (topografix.com/GPX/1/1)
Year Introduced2002 (GPX 1.0); GPX 1.1 released 2004
Common SoftwareGarmin Connect, Strava, QGIS, Google Earth, komoot, Wikiloc

How to Use a Sample GPX File

GPX files are used by fitness apps, mapping tools, and GPS devices. Below are four complete, runnable examples for the most common workflows — from parsing tracks in Python to importing waypoints into a web map.

How to Parse a GPX File in Python (gpxpy)

The gpxpy library is the most widely used Python tool for reading GPX files. It parses the entire file into a structured object with tracks, routes, and waypoints accessible as properties.

import gpxpy

with open("sample-hiking-track.gpx", "r") as f:
    gpx = gpxpy.parse(f)

# Iterate through all tracks and points
for track in gpx.tracks:
    print(f"Track: {track.name}")
    for segment in track.segments:
        for point in segment.points:
            print(f"  Lat: {point.latitude}, Lon: {point.longitude}, Ele: {point.elevation}m")

How to Parse a GPX File in JavaScript (DOMParser)

Since GPX is XML, the browser's built-in DOMParser can parse it without any additional libraries. This is ideal for map visualization tools that run entirely in the browser.

fetch("/sample-hiking-track.gpx")
  .then((res) => res.text())
  .then((gpxString) => {
    const parser = new DOMParser();
    const doc = parser.parseFromString(gpxString, "application/xml");

    const trackPoints = doc.getElementsByTagName("trkpt");
    Array.from(trackPoints).forEach((pt) => {
      const lat = pt.getAttribute("lat");
      const lon = pt.getAttribute("lon");
      const ele = pt.querySelector("ele")?.textContent;
      console.log(lat + ", " + lon + " @ " + ele + "m");
    });
  });

How to Import a GPX File into QGIS

Open QGIS and go to Layer > Add Layer > Add Vector Layer. Set the Source Type to File, click Browse, and select your .gpx file. QGIS will show a dialog asking which GPX layer types to load — select tracks, routes, or waypoints depending on what your sample file contains. Each type becomes a separate layer in the project.

How to Visualize a GPX Track on an Interactive Map (Leaflet)

// Using Leaflet.js + leaflet-gpx plugin
// <script src="https://unpkg.com/leaflet/dist/leaflet.js"></script>
// <script src="https://unpkg.com/leaflet-gpx/gpx.js"></script>

const map = L.map("map").setView([35.595, -82.551], 14);
L.tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png").addTo(map);

new L.GPX("sample-hiking-track.gpx", {
  async: true,
  marker_options: { startIconUrl: null, endIconUrl: null, shadowUrl: null },
})
  .on("loaded", (e) => map.fitBounds(e.target.getBounds()))
  .addTo(map);

How to Create Your Own GPX File

GPX files are XML documents that follow a strict schema defined by the GPX 1.1 specification. Creating one manually requires understanding the three primary element types: wpt (waypoint), rte and rtept (route), and trk, trkseg, and trkpt (track).

Creating a GPX File Manually in a Text Editor

Every GPX file must declare the namespace and version in the root element. Latitude and longitude are attributes on each point element, not child elements. Elevation and time are optional child elements.

<?xml version="1.0" encoding="UTF-8"?>
<gpx version="1.1" creator="MyApp"
     xmlns="http://www.topografix.com/GPX/1/1">
  <trk>
    <name>My Morning Run</name>
    <trkseg>
      <trkpt lat="51.5074" lon="-0.1278">
        <ele>15.0</ele>
        <time>2024-03-28T08:00:00Z</time>
      </trkpt>
      <trkpt lat="51.5080" lon="-0.1285">
        <ele>16.2</ele>
        <time>2024-03-28T08:01:00Z</time>
      </trkpt>
    </trkseg>
  </trk>
</gpx>

Generating a GPX File in Python (gpxpy)

import gpxpy
import gpxpy.gpx
from datetime import datetime, timezone

gpx = gpxpy.gpx.GPX()
track = gpxpy.gpx.GPXTrack(name="My Morning Run")
gpx.tracks.append(track)
segment = gpxpy.gpx.GPXTrackSegment()
track.segments.append(segment)

points = [
    (51.5074, -0.1278, 15.0),
    (51.5080, -0.1285, 16.2),
    (51.5086, -0.1290, 17.0),
]
for lat, lon, ele in points:
    segment.points.append(
        gpxpy.gpx.GPXTrackPoint(lat, lon, elevation=ele,
                                time=datetime.now(timezone.utc))
    )

with open("output.gpx", "w") as f:
    f.write(gpx.to_xml())

Common mistakes to avoid: Always use the WGS84 coordinate system — latitude and longitude in decimal degrees, not degrees-minutes-seconds format. The namespace declaration on the root gpx element is mandatory; omitting it will cause many tools to reject the file. Timestamps must be in ISO 8601 format with UTC timezone (Z suffix). Never swap latitude and longitude — the order is always latitude first, then longitude.

Frequently Asked Questions about GPX Files

What is the difference between a Track and a Route in GPX?

A Track (TRK) is a recorded sequence of points representing where you have actually traveled — it is historical data captured by a GPS device. A Route (RTE) is a planned sequence of waypoints meant to be navigated in order — it is future-facing. Our samples include both types so you can test parsers that handle either use case correctly.

Can I open a GPX file in Google Maps?

Google Maps does not natively open GPX files on the main search page. Go to Google My Maps (mymaps.google.com), create a new map, and click Import in the layer panel to upload and visualize the .gpx file as an overlay. Komoot, Strava, and AllTrails all support direct GPX import without this extra step.

How do I open a GPX file on Windows or Mac?

On Windows, GPX files can be opened in Google Earth Pro (free), QGIS (free and open source), or Garmin BaseCamp. On Mac, the same applications work, plus you can drag the file into Garmin Connect or open it in any text/XML editor to inspect the raw coordinates. VS Code renders it as formatted XML with syntax highlighting.

What is the maximum file size for a GPX file?

There is no hard limit in the GPX specification, but most GPS devices and fitness apps struggle with files over 50 MB. A typical one-hour run at one GPS point per second generates a file of about 1 MB. For multi-day expeditions, split the GPX by day using the GPX Merger tool in reverse, or filter to fewer track points by recording at a lower frequency.

Are the elevation markers accurate in these sample files?

The elevation data in our hiking and summit samples is based on USGS topographic models for the specified geographic coordinates, making them realistic for testing altimeter-parsing logic, gain and loss calculations, and elevation profile charts. For production fitness apps, you should use a dedicated elevation API (like Google Elevation or Open-Elevation) to correct raw GPS elevation data, which is typically less accurate than elevation from digital elevation models.

Can I convert GPX to KML or GeoJSON?

Yes. KML is Google's format for Google Earth, and GeoJSON is the web standard for geographic data. In Python, gpxpy parses the GPX and you can write the coordinates to json in GeoJSON format manually. Online tools like gpx.studio and MyGeodata Converter convert between GPX, KML, GeoJSON, and Shapefile formats without any coding.

How do I validate a GPX file?

GPX files can be validated against the official XSD schema published at topografix.com/GPX/1/1/gpx.xsd. Use Python's lxml library with etree.XMLSchema to perform offline validation. Online, gpx.studio will attempt to render your file and report errors if the format is invalid. Most common errors are missing namespace declarations and swapped latitude and longitude values.

How do I merge multiple GPX files into one?

Download the sample files from this page and use our GPX Merger tool to combine them into a single continuous track in your browser without uploading your sensitive location data to a server. In Python, gpxpy allows you to append segments from one GPX object into another and write the result to a new file.