# GPX Merge

Merge several GPX files, tracks, routes and waypoints into one GPX 1.1 file, ordered chronologically by timestamp. Runs in your browser; nothing is uploaded.

## Run it

- **CLI:** `gizza tool gpx-merge '<?xml version="1.0"?>
<gpx version="1.1"><trk><name>Morning</name><trkseg>
  <trkpt lat="52.100" lon="5.100"><time>2024-01-01T08:00:00Z</time></trkpt>
</trkseg></trk></gpx>'`
- **Web:** https://gizza.ai/tools/gpx-merge/
- **Agents:** machine-readable descriptor (parameters JSON Schema) at https://gizza.ai/tools/gpx-merge/tool.json

## Inputs

- `input` — GPX files (paste one or more, one after another) _(field)_
- `merge_mode` — Merge mode _(field)_
- `sort_by_time` — Order chronologically by timestamp _(field)_
- `dedupe` — Drop duplicate points where files overlap _(field)_
- `include_waypoints` — Keep waypoints (<wpt>) _(field)_
- `track_name` — Merged track name _(field)_

## Output

- Merged GPX (text)

## Query parameters

Open the tool pre-filled and auto-run via URL:

- `input` — GPX files (paste one or more, one after another)
- `merge_mode` — Merge mode
- `sort_by_time` — Order chronologically by timestamp
- `dedupe` — Drop duplicate points where files overlap
- `include_waypoints` — Keep waypoints (<wpt>)
- `track_name` — Merged track name

Example: `https://gizza.ai/tools/gpx-merge/?input=%3C%3Fxml%20version%3D%221.0%22%3F%3E%0A%3Cgpx%20version%3D%221.1%22%3E%3Ctrk%3E%3Cname%3EMorning%3C%2Fname%3E%3Ctrkseg%3E%0A%20%20%3Ctrkpt%20lat%3D%2252.100%22%20lon%3D%225.100%22%3E%3Ctime%3E2024-01-01T08%3A00%3A00Z%3C%2Ftime%3E%3C%2Ftrkpt%3E%0A%3C%2Ftrkseg%3E%3C%2Ftrk%3E%3C%2Fgpx%3E&merge_mode=single-track&sort_by_time=true&dedupe=true&include_waypoints=true&track_name=Merged%20track`

---

## About this tool

Use GPX Merge when you have several exported rides, runs, hikes, routes or waypoint files and need one clean GPX 1.1 document. Paste the GPX text from each file one after another; the tool collects tracks (`<trk>`), routes (`<rte>`) and waypoints (`<wpt>`) from every pasted document.

By default the result is one continuous track ordered by timestamp, which is useful for joining split recordings or rebuilding a route from separate stages. Switch **Merge mode** to keep each original segment break, or keep each source track as its own `<trk>` when you want the output to preserve daily stages.

### Worked example

Paste two GPX documents, leave **Merge mode** set to `single-track`, and keep **Order chronologically by timestamp** checked. The output contains one `<trk>` named `Merged track`; points from both inputs are sorted by their `<time>` values so a point recorded at `07:00:00Z` appears before points recorded at `08:00:00Z` and `09:00:00Z` even if the files were pasted in a different order.

### Limits and edge cases

- Input is GPX text only. Convert TCX, FIT or GeoJSON with a dedicated converter first.
- Multiple files are represented by pasting several complete GPX documents into the same input field.
- Coordinates, elevations and timestamps are preserved as written; this tool does not simplify or resample tracks.
- Timestamp sorting expects ISO-8601 / RFC-3339 values such as `2024-01-01T08:00:00Z`. Untimed points keep their input order and sort after timed points.
- `dedupe` removes only consecutive duplicate points with the same latitude, longitude and timestamp; it does not perform fuzzy GPS matching.

## FAQ

<details>
<summary>Can I merge more than two GPX files?</summary>

Yes. Paste each complete GPX file one after another in the input box. The parser scans the combined text and collects every track, route and waypoint it finds.

</details>

<details>
<summary>What is the difference between the merge modes?</summary>

`single-track` creates one track with one continuous segment. `single-track-multi-segment` creates one track but keeps each original segment break. `separate-tracks` writes each source track as a separate `<trk>` in the output.

</details>

<details>
<summary>Will waypoints be kept?</summary>

Waypoints are kept by default, including their name, description, symbol, elevation and timestamp when present. Turn off **Keep waypoints** if you only want tracks and routes in the merged file.

</details>

<details>
<summary>Does the tool upload my GPS data?</summary>

No. The merge runs locally in the browser WebAssembly module and returns text directly on the page.

</details>

## Related tools

- [Avro to JSON Converter](https://gizza.ai/tools/avro-to-json/): Decode Apache Avro Object Container Files (.avro / OCF) to JSON, NDJSON, or the embedded schema — no .avsc needed, free and private in your browser.
- [Bencode decoder](https://gizza.ai/tools/bencode-decoder/): Decode bencode (the BitTorrent / .torrent serialization format) into readable JSON, and re-encode JSON back into canonical bencode — in your browser. Nothing is uploaded.
- [CAMT.053 Statement Parser](https://gizza.ai/tools/camt053-parse/): Parse a camt.053 (or camt.052/054) ISO 20022 bank statement XML into JSON or CSV in your browser: balances, dates, counterparties, references. No upload.
- [CSV Cell Diff](https://gizza.ai/tools/csv-cell-diff/): Compare two CSVs column-by-column and highlight every individual cell that changed, plus added and removed rows and columns.
- [Change CSV Delimiter](https://gizza.ai/tools/csv-change-delimiter/): Re-save CSV or delimited data with a different separator (comma, tab, semicolon, pipe) with correct requoting — in your browser. Free, private, no upload.
