GPX vs FIT vs GeoJSON
Three file formats dominate the world of GPS and fitness data: GPX, FIT, and GeoJSON. Each was designed for a different purpose, by different organizations, with different technical trade-offs. This guide provides an in-depth comparison to help you understand when and why each format is used.
GPX — GPS Exchange Format
History
GPX was created by TopoGrafix, a company founded by Dan Foster in Stow, Massachusetts. Development began in late 2001 through discussions among GPS software developers who wanted an open, device-independent format to replace the many proprietary GPS data formats in use at the time.
- GPX 1.0 was released on 1 March 2002
- GPX 1.1 was released on 9 August 2004 and remains the current version
- The specification is public domain, meaning anyone can implement it freely
Technical Details
GPX is an XML-based format, meaning files are plain text and human-readable. Key characteristics include:
- Schema:
http://www.topografix.com/GPX/1/1 - Root element:
<gpx>with requiredversionandcreatorattributes - Three core data types:
- Waypoints (
<wpt>) — individual named locations - Routes (
<rte>) — ordered sequences of turn points for navigation - Tracks (
<trk>) — recorded GPS traces, containing segments (<trkseg>) of track points (<trkpt>)
- Waypoints (
- Each point stores latitude and longitude as XML attributes; elevation and time are child elements
- A
<metadata>element can hold name, description, author, copyright, links, keywords, and creation time - Extensibility via
<extensions>elements (e.g., Garmin's TrackPointExtension for heart rate, cadence, power, and temperature) - Coordinates use decimal degrees in the WGS84 datum
References
FIT — Flexible and Interoperable Data Transfer
History
The FIT protocol was developed by Dynastream Innovations, a technology company based in Cochrane, Alberta, Canada. Dynastream created the ANT wireless protocol in 2003 and the ANT+ interoperability framework in 2004, both widely used for connecting fitness sensors to devices.
- Garmin acquired Dynastream in December 2006 for approximately $36 million
- The FIT format emerged around 2009–2010 as a purpose-built format for fitness device data storage and transfer
- FIT replaced Garmin's earlier TCX (Training Center XML) format as the preferred activity recording format
- Dynastream was later renamed to Garmin Canada Inc. in 2018
- The FIT SDK is available in 8 programming languages: C, C++, C#, Java, JavaScript, Objective-C, Python, and Swift
Technical Details
FIT is a binary format, meaning files are compact and machine-readable but not human-readable. Key characteristics include:
- Message-based protocol: a FIT file contains a sequence of data messages, each with a local message type, fields, and values
- Key message types: file_id, activity, session, lap, record, device_info, sport, workout
- Timestamps use the FIT epoch (31 December 1989, 00:00:00 UTC) as their base
- Coordinates are stored as semicircles (180 / 231 degrees per semicircle), an integer representation that avoids floating-point rounding
- Native sensor support: heart rate, power, cadence, temperature, speed, distance, altitude, GPS coordinates, training zones, workout steps, and device info are all first-class fields
- A
Profile.xlsxfile defines all standard messages and field types in the SDK - File types: Activity, Course, Workout, Sport, Settings, Goals, and more
- CRC integrity checking ensures data has not been corrupted
- Forward-compatible: older parsers can safely skip unknown messages, so the format evolves without breaking existing software
References
GeoJSON
History
GeoJSON was created by a working group of six developers: Howard Butler, Martin Daly, Allan Doyle, Sean Gillies, Tim Schaub, and Christopher Schmidt. The format draws on concepts from the OpenGIS Simple Features specification.
- Working group discussions began in March 2007
- GeoJSON 1.0 was published on 16 June 2008 at geojson.org
- The IETF Geographic JSON working group was formed in October 2015 to standardize the format
- Published as RFC 7946 in August 2016 (IETF Proposed Standard), superseding the 2008 specification
Technical Details
GeoJSON is a JSON-based format, making it human-readable and natively compatible with JavaScript and web applications. Key characteristics include:
- Seven geometry types: Point, MultiPoint, LineString, MultiLineString, Polygon, MultiPolygon, GeometryCollection
- A Feature object wraps a geometry with a
propertiesobject for arbitrary metadata - A FeatureCollection groups multiple Features into a single object
- Coordinate order: longitude first, then latitude — the opposite of GPX's latitude, longitude order
- An optional third coordinate value represents altitude
- WGS84 coordinate reference system is mandated by RFC 7946
- MIME type:
application/geo+json(per RFC 7946) orapplication/json - Encoding: UTF-8
- The
propertiesobject can hold any JSON key-value pairs — there is no predefined schema - No native concept of time, tracks, routes, or sensor data — these must be encoded as custom properties
References
Comparison Table
| Feature | GPX | FIT | GeoJSON |
|---|---|---|---|
| Full Name | GPS Exchange Format | Flexible and Interoperable Data Transfer | Geographic JSON |
| Created By | TopoGrafix (Dan Foster) | Dynastream Innovations (Garmin) | Butler, Daly, Doyle, Gillies, Schaub, Schmidt |
| First Released | 2002 | ~2009 | 2008 |
| Current Version | 1.1 (2004) | Protocol 2.0+ (ongoing) | RFC 7946 (2016) |
| Format Type | XML (text) | Binary | JSON (text) |
| Human-Readable | Yes | No | Yes |
| File Extension | .gpx | .fit | .geojson, .json |
| Specification | Public domain | Proprietary (SDK freely available) | IETF RFC 7946 |
| Coordinate System | WGS84 (lat, lon) | Semicircles (converted to WGS84) | WGS84 (lon, lat) |
| Coordinate Order | latitude, longitude | latitude, longitude (semicircles) | longitude, latitude |
| GPS Tracks | Native (trk/trkseg/trkpt) | Native (record messages) | LineString geometry |
| Waypoints | Native (wpt) | Not a primary use case | Point geometry |
| Routes | Native (rte/rtept) | Course file type | LineString geometry |
| Timestamps | Per-point (ISO 8601) | Per-point (FIT epoch) | Not native (via properties) |
| Heart Rate | Via extensions only | Native field | Via properties |
| Power | Via extensions only | Native field | Via properties |
| Cadence | Via extensions only | Native field | Via properties |
| Temperature | Via extensions only | Native field | Via properties |
| Activity Type | Not supported | Native (sport/sub_sport) | Via properties |
| Device Info | Not supported | Native (device_info message) | Via properties |
| Workout Structure | Not supported | Native (workout/steps) | Not supported |
| Training Zones | Not supported | Native | Not supported |
| Lap Data | Not supported | Native (lap messages) | Not supported |
| File Size | Large (verbose XML) | Small (compact binary) | Medium-Large (verbose JSON) |
| Extensibility | XML extensions element | Profile updates | Properties object |
| Typical Use | Route sharing, navigation | Activity recording, fitness | Web mapping, GIS |
Where Each Format Is Used
GPX
- Route planning: Komoot, Ride with GPS, AllTrails
- GPS devices: Garmin, Wahoo, Coros (import and export)
- Sharing: OpenStreetMap, cycling forums, hiking communities
- Navigation: most GPS devices accept GPX course files
- Geocaching: the standard format for cache locations and logs
FIT
- Garmin devices: Edge, Fenix, Forerunner, Venu (native recording format)
- Other devices: Wahoo, Bryton, Stages (also record in FIT)
- Analysis platforms: Strava, TrainingPeaks, Today's Plan, GoldenCheetah
- Virtual training: Zwift
- Data sync: Garmin Connect
GeoJSON
- Web mapping: Leaflet, Mapbox GL, Google Maps API, OpenLayers
- GIS software: QGIS, ArcGIS
- Databases: PostGIS, MongoDB geospatial queries
- Code platforms: GitHub renders GeoJSON files natively on a map
- APIs: many location-based services use GeoJSON as their data interchange format
Which Format Should You Use?
- Sharing a route for navigation — use GPX. It is nearly universally supported by GPS devices and route-planning tools.
- Recording an activity with sensor data — use FIT. It natively supports heart rate, power, cadence, laps, and all the metrics fitness platforms expect.
- Displaying data on a web map or in a GIS tool — use GeoJSON. It integrates directly with JavaScript mapping libraries and spatial databases.
- Maximum compatibility — use GPX. Almost every GPS application, device, and platform can read GPX files.
- Smallest file size — use FIT. Its compact binary encoding produces files significantly smaller than the equivalent XML or JSON.
- Easiest to work with programmatically — use GeoJSON. It can be parsed natively in any language with a JSON parser, and its structure maps cleanly to objects and arrays.