A web-based tool that lets you upload a GPX file, visualise the route on an interactive map and split it into multiple sequential segments for download.
Built with JavaScript and Leaflet, it's designed for cyclists, runners and hikers who want to break long routes into manageable parts.
- Upload via file picker or drag and drop (drop a
.gpxfile anywhere on the page) - Split points are numbered in route order, so they always match Part 1, 2, 3
- Waypoints are written only to the part of the route they sit on
- Visualise routes on an interactive map
- Click anywhere on the route to create up to 10 split points
- Automatically split GPX into sequential segments
- Download each segment as a separate GPX file
- Toggle:
- Units (km / miles)
- Waypoint visibility
- Displays:
- Distance markers along the route
- Elevation (when available)
- Start / end markers
- Waypoints from GPX files
- Step-based progress UI for workflow clarity
Upload a .gpx file → click on map to add split points → export segments → download files.
- PHP (for simple templating and cache-busting assets)
- Vanilla JavaScript (no framework)
- Leaflet.js for mapping
- OpenStreetMap tiles
Simply clone the respository and run it locally or publicly on your own server.
- Click Choose GPX File, or drag and drop a
.gpxfile onto the page - The route will appear on the map
- Click on the route to add split points (max 10). Click a split marker to remove it
- Click Export Split GPX Files
- Download generated segments
- Click Reset to start again with a new file
The app parses:
<trkpt>for route geometry<wpt>for waypoints
The route is drawn as a polyline using Leaflet and OpenStreetMap tiles.
When you click the map:
- The nearest route point is found
- Its index is stored (a point that already has a split is ignored)
- Splits are kept sorted by route position and renumbered automatically
- The route is sliced at those indices during export
- Each segment is converted back into valid XML and made available as downloadable
.gpxfile(s). - Each waypoint is assigned to the part containing its nearest track point, so it appears in exactly one file.
- Everything runs in your browser, so your GPX file is never uploaded and nothing is saved to a server or database
- Closing or refreshing the page clears your route and splits
- Only one file can be loaded at a time (via the picker or drag and drop)
- After exporting, the upload is locked until you click Reset
- Only track points (
<trkpt>), their elevation and waypoints are kept. Other data such as timestamps and extensions isn't carried into the exported files - Very large tracks may slow the page down, though this is unlikely
- Map data © OpenStreetMap contributors
- Leaflet
MIT