Format comparison
GeoJSON vs GPX: Web Mapping vs GPS Tracks
GeoJSON is a general-purpose geospatial format for web maps and APIs, supporting any geometry type with arbitrary attributes. GPX is a specialized XML format for GPS data — optimized for tracks, waypoints, and routes with native timestamp and elevation support.
Advertisement (728×90)
Bottom line
Use GeoJSON for web mapping and general GIS. Use GPX for GPS device data where native timestamp and elevation semantics are important.
GeoJSON vs GPX: feature comparison
| Feature | GeoJSON | GPX |
|---|---|---|
| Geometry types | Points, lines, polygons, multi-* | Waypoints, tracks, routes |
| Timestamp support | Via properties | Native per track point |
| Elevation support | Via properties | Native (3D) |
| GPS device support | No | Yes (Garmin, Wahoo, etc.) |
| Polygon support | Yes | No |
| CRS | WGS 84 | WGS 84 |
GeoJSONWhen to use GeoJSON
- Web mapping with Leaflet, Mapbox, or MapLibre
- Datasets with polygon or complex geometry
- APIs and data exchange needing rich attributes
GPXWhen to use GPX
- Exporting GPS tracks from a device or app
- Hiking, cycling, or navigation data
- Any workflow needing native track/waypoint semantics
Convert between GeoJSON and GPX
Frequently asked questions
Q.Can I convert GPX to GeoJSON online?
Yes. Maparz converts GPX to GeoJSON — track segments become LineString features and waypoints become Point features.
Q.Does GeoJSON support elevation data?
Yes — GeoJSON coordinates can include a third Z value for elevation. However, most web mapping libraries ignore the Z value for rendering.