A powerful, web-based GPX track editor for simplifying, editing, splitting, and joining GPS tracks. Perfect for cleaning up recorded tracks from apps like GeoTracker before sharing or analyzing.
π Live App: https://asg49.github.io/GPXWeaver/
- Fast load for massive files β tested with 500,000+ points in 120MB+ GPX files
- Toggle-only marker visibility β no automatic recalculation on zoom, fast zooming at any scale
- Clean default β only the track line is shown on load; markers appear only when you ask for them
- Douglas-Peucker algorithm for intelligent point reduction
- Manual simplification at any percentage (1β95%) β no auto-simplification
- Restore Original to undo simplification at any time
- Simplification respects your current marker visibility setting
- Manual toggle only β "ββ Points OFF / β Points ON" button controls all marker display
- No automatic zoom-based marker loading β zoom freely without performance hits
- Marker colors: π΄ Red (normal/delete mode) Β· π Orange (split mode)
- Drag points β move any point to adjust position (coordinates rounded to 6 decimal places)
- Add points β tap the track line to insert new waypoints with interpolated ele, time, speed, and course
- Delete points β long-press (2.6s) on any point to mark for deletion
- Rectangle Selection β draw a rectangle to bulk-select and delete multiple points (works on mobile and desktop)
- All edits update the track line in real time
- Split mode β tap any point to divide the track at that location
- Save individual segments as separate GPX files
- Split markers auto-clean after save
- Smart multi-file loading β select 2+ files and they join automatically
- Geometric chaining β tracks are ordered by geographic proximity of endpoints, not by filename or selection order
- Starting track auto-identified as the one with no incoming connection
- Greedy nearest-neighbor chain eliminates stray connecting lines
- Select 1 file = load normally; select multiple = auto-chain and join
- Logarithmic gap threshold slider (10m β 1,000km)
- Prevents unwanted connector lines between segments
- Adjustable in real time
- OpenStreetMap
- OpenTopoMap (topographic contours)
- Google Terrain (default)
- Google Satellite
- Google Hybrid
- Esri World Imagery
Desktop:
- Zoom display + Points toggle β bottom-left
- Scale bar β bottom-right
- Layer selector β top-right
Mobile:
- Zoom display β top-left (below +/β buttons)
- Points toggle β top-right
- Scale bar β bottom-right
- Save filename uses the actual disk filename you loaded, not the internal GPX track name
- Edited files get
_Xsuffix (e.g.MyHike_X.gpx) - Current filename displayed in header bar (updates to
_Xon first edit) - Saved GPX always includes a
<metadata>block with save filename and UTC timestamp - All original
<trkpt>data preserved on save: elevation, time, speed, course, extensions - Coordinate precision: always 6 decimal places (~0.11m)
- GeoTracker extensions (
<geotracker:meta c="course" s="speed"/>) fully preserved and interpolated for added points
- HTML sanitization on all track name display (
sanitizeHTML()) - XML sanitization on all GPX output (
sanitizeXML()) - Protects against malicious GPX files with injected content
- Responsive layout for phones and tablets
- Touch-friendly controls including rectangle selection
- Compact header with current filename displayed
- Load a GPX file β Menu (β°) β Load GPX File β select file(s)
- Select multiple files to auto-chain and join them geometrically
- View your track β blue line shown immediately; no markers until you ask
- Show markers β click "ββ Points OFF" β becomes "β Points ON"
- Edit β drag points, tap line to add, long-press to delete, or draw a rectangle to bulk-delete
- Simplify β Menu β adjust slider β Apply Simplification β Restore Original if needed
- Save β Menu β Save GPX β file saves with
_Xsuffix using your original filename
- Generate your route segments in Google Maps (max 10 waypoints each)
- Convert each to GPX using maptogpx.com
- Menu β Load GPX File β select all segment files at once
- GPXWeaver automatically chains them in the correct geographic order
- Review the join list, then Join All Tracks
- Menu β Enable "Rectangle Select"
- Draw a rectangle over the points you want to remove
- Tap "Delete Selected" to remove them all at once
- Menu β Enable "Split Mode"
- Tap the point where you want to split
- Save β downloads as separate GPX files
- Menu β adjust Gap Detection slider
- Increase to hide connector lines between segments
- Works in real time
- Input:
.gpxfiles (GPX 1.0 and 1.1) - Output: GPX 1.1, all original
<trkpt>data preserved (ele, time, speed, course, extensions) - Metadata:
<metadata>block added to every saved file with name and timestamp - Coordinates: 6 decimal places in all output
- Namespaces: GeoTracker and other extension namespaces declared at root level
| Control | Desktop | Mobile |
|---|---|---|
| Zoom +/β | top-left | top-left |
| Zoom display | bottom-left | top-left |
| Points toggle | bottom-left | top-right |
| Layer selector | top-right | top-right |
| Scale bar | bottom-right | bottom-right |
- Single HTML file β no dependencies to install, works offline after first load
- Leaflet.js mapping library
- Douglas-Peucker simplification algorithm
- Haversine distance formula for accurate geographic calculations
- Geometric nearest-neighbor chaining for correct multi-track join order
- All event listeners properly registered inside
DOMContentLoaded - XSS protection on all user-generated content inserted into HTML or XML
β v6.7 β Geometric chaining bug fix
- Critical fix:
maxIncomingDistwas initialized toInfinityinstead of-Infinity - Condition
closestIncoming > Infinityis always false β starting track never updated - Algorithm silently did nothing; tracks were always joined in browser file order
- One-character fix restores correct geometric chaining behavior β
β v6.6 β Geometric track chaining
- Replaced alphabetical sort with nearest-neighbor geographic chaining
haversineDistance()for accurate endpoint distance calculation- Starting track = the one whose first point has no close incoming endpoint
- Eliminates stray connecting lines from wrong join order
- Works regardless of browser file selection order or filename
β v6.5 β Gap slider initialization fix
- Gap Detection slider thumb was rendering at far right on load
- Added explicit initialization inside
DOMContentLoaded - Slider and label now correctly show 1.0 km on load
β v6.4 β Slider visibility
accent-color: #3498dbon both sliders for visibility on dark background
β v6.3 β Namespace fix
- Browser
innerHTMLwas injecting redundantxmlns=on every<trkpt>child element - Added
cleanInnerXML()to strip redundant declarations before GPX output xmlns:geotrackerdeclared at root<gpx>level (correct XML practice)- Saved files now load cleanly in all GPX applications
β v6.2 β Event listeners & metadata
- All event listeners moved inside
DOMContentLoaded(was causing menu/layer failures) - GPX
<metadata>block (filename + UTC timestamp) added to all saved files - Coordinate precision fixed to 6 decimal places in all three GPX generators
β v6.1 β Coordinate precision
- Dragged and added points stored and output at 6 decimal places (was 15+)
β v6.0 β GeoTracker data preservation
- Full
<trkpt>innerHTML preserved through all edit operations interpolateSpeed()andinterpolateCourse()for added points- Comprehensive code audit: XSS sanitization, dead code removal, logic fixes
- Fixed geometric chaining:
maxIncomingDistinitialized to-Infinity(wasInfinity) - Starting track now correctly identified; join order now truly geometric β
- Geometric nearest-neighbor track chaining replaces alphabetical sort
haversineDistance()andgeometricChainTracks()functions added- 500m endpoint threshold handles GPS rounding between shared waypoints
- Gap Detection slider thumb now correctly initialized inside
DOMContentLoaded accent-coloradded to both sliders for dark-background visibility
- Slider accent color fix
cleanInnerXML()strips redundantxmlnsfrom trkpt innerHTML before outputxmlns:geotrackerdeclared at root<gpx>element in all three generators- Fixed read-back failure for files saved by v6.2
- All event listeners inside
DOMContentLoaded(was causing menu/layer control failures) <metadata>block (filename + UTC timestamp) in all saved GPX files- Coordinate precision fixed to
toFixed(6)ingenerateGPXForTrack() - CSS duplicate
#headerrule fixed (was hiding header bar)
- Dragged and added point coordinates rounded to 6 decimal places
- GeoTracker
<geotracker:meta c="course" s="speed"/>extensions parsed and preserved interpolateSpeed()andinterpolateCourse()for added points (0Β°/360Β° wrap handling)- Major code audit: XSS sanitization, duplicate function removed, dead code cleaned
- All
<trkpt>data preserved viainnerHTMLcapture; all three GPX generators output it verbatim
- Filename displayed in header bar; updates on first edit; clears on track clear
- Save uses actual disk filename not internal GPX
<name>tag
sanitizeHTML()andsanitizeXML()added throughout- Dead code, duplicate functions, unused constants removed
- Toggle-only rule enforced in all
createMarkers()call sites
- Toggle-only point visibility;
zoomenddoes safety cleanup only - Fast zooming at any zoom level, no recalculation overhead
- Rectangle selection fixed on mobile (
changedTouchesinstead oftouches)
- Mobile controls: zoom top-left, toggle top-right, scale bottom-right
MIT License β see LICENSE file for details.
Tony Gozdz Β© 2026
Battery R&D Engineer Β· Serious GPX Geek πΊοΈ
Tested with files from 100 to 500,000+ points (120MB+ GPX). Handles extreme files efficiently. All editing operations β drag, add, delete, rectangle select, split, join, simplify β work reliably on both mobile and desktop.