GPX files are the lingua franca of outdoor navigation. Short for "GPS Exchange Format," GPX is a universal file format that stores routes, tracks, and waypoints. Any hiking app worth using can import and export GPX files, making them perfect for sharing routes and planning custom adventures.
In this tutorial, I'll show you how to create your own GPX routes from scratch, edit existing routes, and share them with friends or import them into your favorite navigation app.
What's Inside a GPX File?
At its core, a GPX file is just an XML text file containing GPS coordinates. Here's a simplified example:
<trk>
<name>My Custom Hike</name>
<trkseg>
<trkpt lat="36.5785" lon="-118.2923">
<ele>2134</ele>
</trkpt>
<trkpt lat="36.5790" lon="-118.2918">
<ele>2156</ele>
</trkpt>
</trkseg>
</trk>
</gpx>
The key elements are:
- Tracks (trk): A recorded path with a sequence of points
- Track Points (trkpt): Individual GPS coordinates along the track
- Waypoints (wpt): Specific locations marked separately (camps, viewpoints)
- Routes (rte): Planned routes with fewer waypoints (for turn-by-turn)
Best Tools for Creating GPX Files
CalTopo
Free web-based tool with excellent topo maps. Best for detailed route planning.
Gaia GPS
Premium app with route drawing on mobile and web. Syncs across devices.
AllTrails
Draw custom routes on web version. Export requires paid plan.
Komoot
Smart routing for cycling and hiking. Suggests paths automatically.
Method 1: Create a Route in CalTopo (Free)
CalTopo is a free web-based mapping tool beloved by backpackers and Search & Rescue teams. It offers powerful route planning with USGS topo maps.
1 Go to CalTopo.com
Open caltopo.com in your browser. No account is required for basic route creation.
2 Navigate to your hiking area
Use the search box or zoom/pan to find your trailhead. Choose your preferred map layer (Topo, Satellite, etc.).
3 Select the Line tool
Click the Line icon in the toolbar (looks like a squiggly line). This activates route drawing mode.
4 Click to plot your route
Click on the map to add points. Each click creates a segment of your route. Follow trails, or go off-trail if that's your plan. Double-click to finish the line.
5 Export as GPX
Click Export in the top menu, select GPX as the format, and choose which objects to include. Download the file.
💡 Pro Tip: Snap to Trails
In CalTopo's line settings, you can enable "Routed" mode, which snaps your line to known trails instead of drawing straight segments. This creates more accurate routes that follow actual paths.
Method 2: Create a Route in Gaia GPS
Gaia GPS offers route creation on both their web app and mobile app. The web version is easier for detailed planning.
1 Log in to Gaia GPS
Open gaiagps.com and log in to your account (Premium required for full features).
2 Navigate and select Route tool
Find your hiking area, then click the Route button (or press R for keyboard shortcut).
3 Draw your route
Click points on the map to create your route. Gaia can auto-route along trails if you enable that option. Click the last point twice to finish.
4 Save and export
Name your route and save it. To export GPX, go to your saved routes, click the route, and select Export → GPX.
Method 3: Record a Track While Hiking
The simplest way to create a GPX file is to record your actual hike. Most hiking apps do this automatically:
- Start GPS recording before you hike (button varies by app)
- Complete your hike with the recording running
- Stop recording and save the track
- Export the track as GPX from the app's settings or track details
Recorded tracks are valuable because they reflect the actual path, including any detours or route discoveries you made in the field.
Importing GPX Files Into Hiking Apps
AllTrails
- Open AllTrails on web or mobile
- Go to Create → Create Map (web) or tap + (mobile)
- Select Import GPX
- Choose your file and upload
Gaia GPS
- Go to Import on web or tap the folder icon on mobile
- Select your GPX file
- The route/track will appear in your saved items and sync across devices
Organic Maps
- Open the GPX file with Organic Maps (use "Open With" on your phone)
- The track will import as a bookmark layer
- It remains available offline
Editing GPX Files
Sometimes you need to modify an existing GPX file—trimming the beginning, removing errors, or combining routes. Here are your options:
Web-Based Editors
- gpx.studio — Free browser-based GPX editor with excellent features
- CalTopo — Import GPX, edit, re-export
- Gaia GPS web — Edit imported tracks in your account
Desktop Software
- GPX Editor — Dedicated Windows/Mac app for GPX editing
- Google Earth Pro — Import GPX/KML, edit paths, export
- QMapShack — Open source, powerful route planning
Text Editing
GPX files are just XML text. For simple edits (changing the name, removing waypoints), you can open the file in any text editor and modify it directly. Just be careful with the formatting.
Sharing GPX Routes
Email or Messaging
The simplest method—just attach the .gpx file to an email or message. The recipient can import it into their preferred app.
Cloud Storage
Upload to Google Drive, Dropbox, or iCloud and share the link. Recipients can download and import.
AllTrails and Gaia GPS Sharing
Both apps have built-in sharing. In AllTrails, make your custom map public. In Gaia, share routes via link or directly to other Gaia users.
GPX Repository Sites
Sites like Wikiloc and GPSies let you upload and share routes publicly. Great for popular trails you want to document.
Common GPX Issues & Solutions
Route Won't Import
Usually a formatting issue. Try opening in gpx.studio and re-exporting with cleaned-up formatting.
Route Looks "Spiky"
GPS errors create points that jump around. Use a smoothing tool (gpx.studio has this) to clean up the track.
Elevation Data Missing
Some GPX files lack elevation. Tools like gpx.studio can add elevation data from digital elevation models.
Track Too Large
Long tracks with many points create huge files. Use a simplify/reduce points tool to decrease file size while preserving the general route shape.
Summary
GPX files are essential for anyone who plans custom hiking routes or wants to share their adventures. Whether you prefer web-based tools like CalTopo, premium apps like Gaia GPS, or simply recording your hikes in the field, you now have the knowledge to create, edit, and share GPX routes.
Start simple—record your next hike, export the GPX, and share it with a friend. Once you're comfortable, try planning a route in CalTopo and importing it to your phone. Before long, you'll be creating custom adventures that no guidebook has ever documented.