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%)
- Restore Original restores the pre-simplify state — including all manual edits made before simplifying
- Simplification always works from the current edited state — manually added, dragged, or deleted points are never lost
- Manual toggle only — "●○ Points OFF / ● Points ON" 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 (6 decimal place precision)
- 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 (mobile and desktop)
- All edits survive subsequent simplification operations ✓
- Split mode — tap any point to divide the track at that location
- Save individual segments as separate GPX files
- Select 2+ files and they join automatically in the correct order
- Auto-detection of file type:
- GeoTracker recordings (have timestamps) → sorted chronologically by recording date
- Google Maps routes (no timestamps) → chained by geographic proximity of endpoints
- Starting track auto-identified; greedy nearest-neighbor eliminates stray connecting lines
- Browser file selection order and alphabetical filename order are irrelevant
- Logarithmic gap threshold slider (10m – 1,000km)
- Prevents unwanted connector lines between segments
- Adjustable in real time
- OpenStreetMap · OpenTopoMap · 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) · Points toggle (top-right) · Scale bar (bottom-right)
- Save filename uses the actual disk filename, not the internal GPX track name
- Edited files get
_Xsuffix (e.g.MyHike_X.gpx) - Current filename shown in header bar; updates to
_Xon first edit - Saved GPX includes
<metadata>with:<name>: the save filename<time>: the original recording date from the first trackpoint — ensures correct chronological sorting in GeoTracker- Falls back to current date for timestampless files (Google Maps routes)
- All original
<trkpt>data preserved: elevation, time, speed, course, extensions - Coordinate precision: always 6 decimal places (~0.11m)
- GeoTracker extensions (
<geotracker:meta c="course" s="speed"/>) preserved and interpolated for added points
sanitizeHTML()on all track name displaysanitizeXML()on all GPX output
- Responsive layout; touch-friendly controls including rectangle selection
- Compact header with current filename
- Load — Menu (☰) → Load GPX File → select file(s)
- View — blue track line shown immediately
- Show markers — "●○ Points OFF" → "● Points ON"
- Edit — drag, tap to add, long-press to delete, or rectangle-select to bulk-delete
- Simplify — Menu → adjust slider → Apply Simplification (edits are preserved)
- Save — Menu → Save GPX → saves with
_Xsuffix and original recording date
- Menu → Load GPX File → select all recording files
- GPXWeaver sorts them chronologically by recording timestamp
- Join All Tracks → saved file retains original recording date for correct GeoTracker sorting
- Generate segments (max 10 waypoints each) → convert with maptogpx.com
- Menu → Load GPX File → select all segment files
- GPXWeaver chains them geometrically by endpoint proximity → Join All Tracks
- Load file → simplify at desired % if needed
- Add/drag/delete points as needed
- Simplify again if needed — all manual edits are preserved ✓
- Save
- Input:
.gpx(GPX 1.0 and 1.1) - Output: GPX 1.1, all original
<trkpt>data preserved - Metadata: filename + original recording date
- Coordinates: 6 decimal places
- Namespaces: declared at root
<gpx>level
- Single HTML file — no install, works offline after first load
- Leaflet.js · Douglas-Peucker · Haversine distance formula
- Geometric nearest-neighbor chaining (Google Maps) · Chronological sort (GeoTracker)
originalTrackpointskept in sync with all manual edits — simplification never loses work- All event listeners inside
DOMContentLoaded· XSS protection throughout
- Manual edits no longer lost after re-simplification
- Root cause:
applySimplify()always ran fromoriginalTrackpoints(frozen at load time) - Points added/dragged/deleted only existed in
trackpoints— second simplify wiped them - Fix:
applySimplify()snapshotstrackpoints → originalTrackpointsbefore simplifying dragend, point-add,deleteSelectedPoints(),deleteSegmentAndSplit()all now syncoriginalTrackpoints- Restore Original correctly restores post-edit pre-simplify state ✓
<metadata><time>uses first trackpoint timestamp (original recording date)- GeoTracker chronological sorting preserved in saved files
- Falls back to current date for timestampless files
chainTracks()dispatcher: chronological for GeoTracker, geometric for Google MapschronologicalSortTracks()added
- Fixed
maxIncomingDistinitialization (Infinity→-Infinity) - Geometric chaining now correctly identifies starting track
- Geometric nearest-neighbor track chaining replaces alphabetical sort
haversineDistance()andgeometricChainTracks()added
- Gap Detection slider initialized correctly inside
DOMContentLoaded accent-coloradded to both sliders
cleanInnerXML()strips redundantxmlnsfrom trkpt innerHTML- Files now load cleanly in all GPX applications
- All event listeners inside
DOMContentLoaded <metadata>block in all saved GPX files- Coordinate precision fixed to 6 decimal places throughout
- GeoTracker
<geotracker:meta>extensions parsed, preserved, and interpolated - Major code audit: XSS sanitization, dead code removal, logic consistency
- Full
<trkpt>innerHTML preserved · filename in header · disk filename on save - Toggle-only point visibility · all event listeners and security hardened
- Rectangle selection fixed on mobile (
changedTouches)
- Mobile controls: zoom top-left, toggle top-right, scale bottom-right
MIT License — see LICENSE for details.
Tony Gozdz © 2026 · Battery R&D Engineer · Serious GPX Geek 🗺️
Tested with files from 100 to 500,000+ points (120MB+ GPX). All operations — drag, add, delete, rectangle select, split, join, simplify — work reliably on mobile and desktop. Manual edits always survive re-simplification.