How to rename a GPX track
A GPX file has two names, and they have nothing to do with each other: the filename you see in Files or on a computer, and a separate name written inside the file itself, which is what Strava, Garmin Connect and Komoot usually show you after an upload. Renaming one does nothing to the other. Here is where each name actually lives, and the safest way to change it.
The short answer
If you just want a sensible filename, rename the file the same way you would rename anything else â it has no effect on the coordinates inside. If you want the name that shows up on a map or in an activity feed to change, that name is a piece of text inside the XML, and the easiest way to change it is almost never to edit the file by hand: nearly every service that accepts a GPX upload lets you rename the activity afterwards, in its own interface, without touching the file at all.
Two different names, two different places
The filename
This is ordinary filesystem metadata â hike-2024-06-12.gpx or whatever it happens to be called. It lives outside the file's contents entirely, the same way renaming a photo does not touch the pixels inside it. You can rename a GPX file as often as you like and every byte of the route stays exactly as it was recorded.
The track name inside the file
Separately, a GPX file usually carries a short piece of text in a <name> element, either under <metadata> for the file as a whole or under <trk> for an individual track. This is the name a receiving app tends to show first â "Afternoon hike" rather than "track_003.gpx" â and it is the one people usually mean when they say they want to rename a track.
Editing the name inside the file
Because GPX is plain text XML, you can open one in any plain text editor â not a word processor â and change the words sitting between <name> and </name> directly. The rest of the file, every coordinate and timestamp, is untouched by this. It is a one-line edit in a file that might otherwise run to thousands of lines.
The part to get right is leaving the surrounding structure alone. Change only the text between the opening and closing tag, keep both tags exactly as they were, and save as plain text rather than letting an editor add formatting. A word processor is the most common way this goes wrong â it can quietly swap straight quotes for curly ones or save in a format that is no longer plain text, and a GPX parser that expects plain XML will choke on either.
The easier route: rename it after you upload it
On Strava, Garmin Connect, Komoot and most others, the title you set after uploading belongs to that platform's own copy of the activity, not to the file. If you never set a name inside the GPX, the receiving service usually falls back to a placeholder like the date or "Untitled" â cosmetic, and unrelated to whether the underlying track data is correct. Renaming there is lower-risk than hand-editing XML, because there is no way to accidentally damage the file: you are typing into a text box in an app, not touching the source data at all.
This is worth knowing before you go looking for a text editor: if the only reason to rename is so a specific platform shows a better title, that platform almost certainly lets you do it directly, and the original file is left completely alone.
What actually corrupts a GPX file when you edit it by hand
- An unclosed or mismatched tag â deleting </name> along with the old text, or leaving an extra character outside the tags, is enough to make the whole file invalid XML rather than just the name wrong.
- A stray ampersand, less-than or greater-than character typed into the new name â XML treats those symbols as syntax, so a name like "Smith & Sons Trail" needs to be written as "Smith & Sons Trail" or the file stops parsing at that point.
- Saving from a word processor instead of a plain text editor â rich text formatting, smart quotes, or a non-plain encoding can all get written into a file that a GPX parser expects to be nothing but plain XML.
- Editing the wrong <name> â a file can contain more than one, for the file's metadata and for individual tracks separately, so changing one does not always change what a given service displays.
Where TrailCam fits in
TrailCam exports a route as GPX 1.1 or CSV, for a single route or your whole history at once, and can bring an existing GPX file back in the other direction. None of that requires ever opening a text editor â naming an activity is something you do in the app itself, the same as any other recording. Export is part of the optional TrailCam Pro upgrade; the app is free to download.
Questions
- Does renaming a GPX file change the route data inside it?
- No. The filename is separate from the file's contents. You can rename the file itself as many times as you like and every coordinate, timestamp and elevation value stays exactly as recorded.
- Will editing the name inside a GPX file break it?
- Not if you change only the text between the opening and closing <name> tags, using a plain text editor, and leave the tags themselves and the rest of the file untouched. Word processors and unescaped characters like & are the usual causes of a broken file.
- Can I rename an activity on Strava or Garmin Connect without editing the GPX file?
- Yes, and it is the easier option for most people. The title you set after uploading lives with that platform's copy of the activity, separately from whatever name, if any, was written inside the original file.
Recording your own routes
TrailCam is an iPhone app that records your route with GPS, keeps video clips, photos and voice notes pinned to the spot where you took them, and exports the result as GPX 1.1 or CSV. It is free to download.