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 and parse GPX route files
- 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
- Upload your
.gpxroute - The route will appear on the map
- Click on the route to add split points (max 10)
- Click Export Split GPX Files
- Download generated segments
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
- The route is sliced at those indices during export
Each segment is converted back into valid XML and made available as downloadable .gpx file(s).
- Maximum of 10 split points
- Splits are snapped to nearest track point
- No server-side processing (everything runs in your browser, using your system's memory)
- Close the browser and the memory is freed
- Refresh the page and your edits and splits will be lost
- Large route/tracks may reduce performance, but it's unlikely
- No data is saved to server cache or a database
- Map data © OpenStreetMap contributors
- Leaflet
MIT