Track conversion: GPX and GeoJSON lines
Convert a GPX or GeoJSON line to the other format in your browser, preserving coordinate order and available elevation while stripping times, devices, names and original metadata.
Choose a local track and an output format
GPX or GeoJSON only; up to 20 MB and 200,000 points. The file is not uploaded.
The file is read in this page only, is not uploaded and is not retained after a refresh.
Conversion result
- Input format
- —
- Output format
- —
- Points
- —
- Segments
- —
- Geodesic distance
- —
- Output size
- —
The output is a re-serialised line file and is not guaranteed to be byte-identical to the original. The original file stays on your device.
Formula and conditions
What this tool does
The track converter reads a line and writes it again in the format you choose, then offers the result as a download. It is useful for turning a watch or app GPX export into GeoJSON, or a GeoJSON line into GPX for another tool, without carrying the original file's personal information across.
The output contains the line geometry, the coordinate order, the separation between segments and, where a point has reliable elevation, an <ele> element or a third coordinate value. The tool does not write timestamps, device names, person names, file names or other original metadata. It also does not replace missing elevation with zero.
Accepted input
- GPX: reads
trksegelements undertrk; if there is notrkseg, it reads routerteelements instead. Everytrksegorrtebecomes an independent segment; endpoints of different segments are not joined. - GeoJSON: accepts
LineString,MultiLineString, andFeatureCollectionorFeaturewrappers containing only those types. Coordinates are longitude, latitude, with an optional third elevation value.
Point sets, polygons and other non-line geometry types are rejected with an error rather than silently turned into a fake line. Files are limited to 20 MB and 200,000 points and are read locally; nothing is uploaded.
Output and privacy
The output is re-serialized, so even when the output format matches the input the bytes may differ from the original: indentation, number formatting or element order can change. Keep your original file if you need it; the tool never modifies or overwrites it.
The download is generated locally by the browser. Its content is not uploaded, written to server logs or retained after a refresh. On a shared device, think twice before opening a track that reveals a home address.
Verification case
A GeoJSON line with three points: [0, 0, 10], [0.001, 0], [0.002, 0, 15]. After conversion it must still have one segment and three positions, two of which carry elevation (10 and 15) while the middle point has none. Coordinate order and values must not change; missing elevation must not be replaced by null or zero. This case was checked by an independent round trip, not by the page's display output.
What it cannot answer
The converter does not decide whether a line is an official course, whether access is permitted or whether it is suitable for a race, and it does not certify distance. It only changes the file format. To read distance, point count and endpoints, use the track viewer. To reduce the number of points, use track simplification and check the reported points and distance change.
Sources and scope
The file structure follows the GPX 1.1 specification and RFC 7946 for GeoJSON. This article and tool were checked on 2026-10-27.
Implementation specification (English)
These fields support implementation and review. The article text explains them in the page language.
- Formula and conditions
- Parse only line geometry. GPX trkseg and rte elements become independent segments; GeoJSON LineString, MultiLineString and FeatureCollection or Feature wrappers containing only those types are accepted. Serialize the ordered coordinates to the target format, writing elevation only when a point has it. The output contains no timestamps, device names, person names or original metadata.
- Assumptions
- Input coordinates are WGS84 longitude and latitude in that order.
- Only line geometry is accepted; points, polygons and other geometry types are rejected rather than silently discarded.
- Distance is the WGS84 geodesic distance between consecutive points and is informational, not a certified course measurement.
- Conversion re-serializes the geometry, so the output is not byte-identical to the original even when the format is unchanged.
- Missing elevation stays missing; it is never written as zero.
- Input files are limited to 20 MB and 200,000 coordinate points; larger files are rejected before processing.
- Rounding
- Coordinates and elevation values are preserved as parsed; distance is reported to the nearest whole metre; file size is reported in bytes, with binary-friendly units only for display.
Independent examples
Expected values come from independent arithmetic or verified algorithms, not from the page script.
case-track-convert-elevationIndependent examples
Independent round-trip check: the GeoJSON LineString has one segment and three positions. Two positions carry an elevation value (10 and 15); the middle point has no elevation and must not be replaced by zero. Conversion must preserve order and coordinates.
{
"sourceFormat": "geojson",
"targetFormat": "geojson",
"coordinates": [
[
0,
0,
10
],
[
0.001,
0
],
[
0.002,
0,
15
]
]
}{
"segmentCount": 1,
"pointCount": 3,
"elevationPointCount": 2
}Sources and evidence
GPX is an XML schema for exchanging GPS data. GPX 1.1 defines track, route and waypoint structures with latitude, longitude and optional elevation.
GeoJSON defines JSON-based geospatial objects including LineString coordinates. GeoJSON coordinates use longitude, latitude order and positions may include elevation.
Version and review
Written by: RunMap editorial desk (AI-assisted draft and review)
Updated: 27 Oct 2026
Reviewed: 27 Oct 2026 · 1 review record(s)