# GPX to CSV converter

> Get every point of a GPS track as a spreadsheet row: time, latitude, longitude, elevation, heart rate and cadence. Opens in Excel, Google Sheets or pandas. Free, and no account needed.

Open the tool: https://spatibase.com/tools/gpx-to-csv/

The Spatibase GPX to CSV converter turns a GPX file into a CSV table in your web browser, with one row for every track point, route point and waypoint. The columns:

- **Always:** `kind` (track, route or waypoint), `name`, `segment`, `time`, `latitude`, `longitude` and `elevation`.
- **When the file has them:** `heart_rate` and `cadence`, from the sensor data Garmin Connect, Strava and most watches write.
- **Never uploaded.** The track stays on your computer. Files up to 50 MB, no account.

## What it does
- Convert GPX to CSV with one row per track point
- Time, latitude, longitude and elevation for every point
- Heart rate and cadence columns from Garmin and Strava files
- Routes and waypoints as rows too, marked in a kind column
- A segment number for each stretch of recording
- Excel-ready UTF-8, so names with accents read correctly
- Runs in the browser: nothing is uploaded

## How to convert GPX to CSV
1. Download the activity as GPX. On Strava, Export GPX is in the activity’s three-dot menu; in Garmin Connect, Export to GPX is under the gear icon. Watches, bike computers and apps like Komoot save GPX too.
2. Drop the .gpx on the box above, or press Choose a file. No file at hand? The sample is a drawn walking route and three area outlines plus five waypoints: 684 rows, without times.
3. Read the notes under the map: they count the rows and name anything the table leaves out.
4. Press Download CSV.
5. Open it in Excel or Google Sheets, sort by `time`, and chart `elevation` or `heart_rate` against it.

## Formats and limits
- **Opens:** .gpx, up to 50 MB. Other map files (KML, KMZ, GPX, GeoJSON, shapefile, CSV) convert too.
- **Downloads:** CSV, GeoJSON of the same features.
- **Privacy:** the file is read in your browser and never uploaded.
- Try it with a sample: https://spatibase.com/tools/gpx-to-csv/?sample=1
- Download the sample file (the one Open a sample opens): https://spatibase.com/tools/samples/barcelona.gpx

## Which GPX data ends up in the CSV
| What | What happens |
|---|---|
| Track points (`trkpt`) | One row each, `kind` = `track`, in recording order. The track’s `name` repeats on every row. |
| Track segments (`trkseg`) | The `segment` column: 1 for the first segment, 2 after the first break in recording, and so on. |
| Time | The `time` column as the GPX writes it, in UTC: `2026-05-01T08:05:00.000Z`. Empty in a segment where some points have no time, because the times can’t be matched to points then (the notes count them). |
| Elevation (`ele`) | The `elevation` column, in metres. Empty where the GPX has none. |
| Heart rate and cadence | `heart_rate` and `cadence` columns, only when the file has them (Garmin `ns3:` and Strava `gpxtpx:` extensions). |
| Route points (`rtept`) | One row each, `kind` = `route`, with the route’s name and an empty `segment`. |
| Waypoints (`wpt`) | One row each, `kind` = `waypoint`, with its name, time and elevation. |
| Temperature, power and other sensor values | Left out, with a note counting the points: the table has no column for them. |
| Descriptions, symbols and types | Left out of the rows, with a note naming the fields. Download GeoJSON keeps them. |

## One row per point, not one per track
**A track is many rows.** A one-hour run logged every second is about 3,600 track points, and each one is a row. That’s the table pace, heart-rate and elevation charts need; one row per track would only hold its name and shape.

What the columns let you work out in a spreadsheet:

- **Duration:** the last `time` minus the first.
- **Distance:** the haversine formula on the `latitude` and `longitude` of each pair of rows, added up.
- **Climb:** the rises in `elevation` from row to row. Raw GPS elevation jitters, which inflates the total, so apps smooth it first.
- **Time in heart-rate zones:** count the rows per `heart_rate` band. With one point per second, rows are seconds.

**Times are UTC.** GPX stores them with a `Z` at the end, and spreadsheets keep them as text. In Excel, `=DATEVALUE(LEFT(D2,10))+TIMEVALUE(MID(D2,12,8))` turns the `time` in column D into a real date and time; add your offset as hours divided by 24.

**Rows follow togeojson’s order:** tracks first, then routes, then waypoints, whatever the order in the file.

## Convert GPX to CSV with GPSBabel
GPSBabel’s `unicsv` format writes one row per track point, with heart rate and cadence when the GPX has them:

```bash
# tracks only (-t), times in UTC (utc=0)
gpsbabel -t -i gpx -f ride.gpx -o unicsv,utc=0 -F ride.csv

# with GDAL: out/track_points.csv, longitude (X) first
ogr2ogr -f CSV out/ ride.gpx track_points -lco GEOMETRY=AS_XY
```

**Mind the time zone.** Without `utc=0`, GPSBabel writes the times in your computer’s time zone, split into `Date` and `Time` columns. It reads Garmin’s `ns3:` heart rate without help.

**GDAL’s table is wider:** 28 columns, most of them empty (`magvar`, `hdop`, `link1_href`…), times written as `2026/05/01 08:00:00+00`, and no heart-rate column.

## Frequently asked questions
### Can Excel open a GPX file?
Only as XML. Excel can load a .gpx as an XML table, but the nesting of tracks, segments and sensor extensions comes out as a wide, repetitive sheet. The CSV from this page has one clean row per point with named columns.

### How do I get heart rate data out of a GPX file?
Convert it here. When the GPX has heart rate, the CSV gets a heart_rate column with a value for each track point, and a cadence column when that is recorded too. Garmin Connect and Strava include both in their GPX exports when the activity was recorded with a sensor.

### What does the segment column mean?
A GPX track is split into segments wherever recording stopped and started again. Rows from the first segment say 1, the next segment 2, and so on. Route points and waypoints leave it empty.

### Are the times in the CSV in my local time zone?
No, they are in UTC, as the GPX stores them (the Z at the end). Add your offset in the spreadsheet, for example two hours for summer time in Central Europe.

### Does the CSV include distance or speed?
No. It holds what the GPS recorded: position, time, elevation and sensor values. Distance and speed come from consecutive rows: the haversine formula gives the distance, and dividing it by the time between the rows gives the speed.

### Why does every row repeat the track name?
So each row stands on its own: you can filter, sort or combine files without losing which track a point belongs to. The kind column tells track points, route points and waypoints apart.

## Next step
Turn the file into a live map your team can edit: **Save to Spatibase (free)** on the page saves it to a free Spatibase project (https://app.spatibase.com/signup), your places on a map you can edit and a live GeoJSON address for your site. Or download the GeoJSON and import it by hand (https://spatibase.com/docs/content/import/).
