1. Home
  2. Calculators
  3. GPX to GeoJSON Converter

GPX to GeoJSON Converter

For mappers, hikers and developers: move a track between the file formats of watches, map apps and web maps.

Free, no sign-up. Runs in your browser: nothing is uploaded.

Free workspace included. Docs, spreadsheets, notes and tasks that save on your device. No sign-up.Take a look

How to use GPX to GeoJSON Converter

  1. Press Sample, or paste or open a GPX, KML or GeoJSON file.
  2. Choose the output format.
  3. Copy the result or download the file.

Features

  • Detects GPX, KML or GeoJSON automatically
  • Writes GeoJSON, GPX, KML or CSV
  • Keeps waypoints, tracks, routes, heights and GPX times
  • Counts waypoints, segments and points
  • Runs in the browser, nothing is uploaded

Supported formats

Input

  • GPX, KML or GeoJSON file or pasted text

You get

  • GeoJSON
  • GPX
  • KML
  • CSV

Private by design

Everything you enter is processed by your browser on this device. Nothing is sent to openWorkstand or anyone else, so the GPX to GeoJSON Converter is safe for private and work data. After you have used it once while online, it also works without an internet connection. How local processing works

Good to know

  • Styles, icons, extensions and polygons' interior details are not carried over; polygons are read as lines.
  • Very large files can be slow in the browser.
  • Everything runs in your browser; nothing you type is sent anywhere.

Guide

Converting GPX, KML and GeoJSON: what each format stores and what a conversion keeps

Maps and devices speak different file formats. A running watch records GPX, Google Earth saves KML, and web maps such as Leaflet and Mapbox read GeoJSON. Moving a route from one to another is a common job, and this converter does it in your browser without uploading anything.

The three formats

GPX, the GPS Exchange Format, is XML. It holds waypoints (single named points), routes (planned sequences of points) and tracks (recorded paths made of segments of track points). Each point has a latitude and longitude as attributes and optionally a height and a time. KML, Keyhole Markup Language, is XML too, built around Placemark elements that hold a Point, a LineString or other shapes, with the position written as longitude, latitude and altitude separated by commas. GeoJSON is JSON, with features that have a geometry such as a Point, a LineString or a MultiLineString and coordinates in the order longitude, latitude, elevation.

How it is converted

The tool reads the input into a simple model of waypoints and tracks: each waypoint has a name, a position, an optional height and a description, and each track has a name and one or more segments of points with optional heights and times. It then writes that model in the format you choose. GPX routes are read as tracks, KML placemarks with a line become tracks and those with a point become waypoints, and a GeoJSON polygon is read as a line around its ring.

Choosing the output

GeoJSON suits web maps and code. A track with one segment becomes a LineString and a track with several becomes a MultiLineString. GPX is the format for GPS devices and fitness apps, and keeps times. KML is for Google Earth and similar viewers. The CSV option lists every point, with the type (waypoint or track), the name, the segment, the latitude and longitude, the height and the time, for use in a spreadsheet.

A worked example

Press Sample to load a GPX file with one waypoint, named Summit cairn, and one track of 61 points in a single segment, an out-and-back hill walk. The tool reports that it was read as GPX, with 1 waypoint, 1 track, 1 segment and 61 points. Switch the output to GeoJSON and you get a Point for the cairn and a LineString for the walk, with heights as the third coordinate of each position. Switch to KML to get two Placemarks, or to CSV to get a header and 62 rows.

What is lost

Each format has features the others lack. A GPX file can hold time stamps and extensions, such as heart rate or cadence from a watch, which GeoJSON and KML do not store in this conversion. KML carries styles, icons, folders and descriptions in HTML, and GeoJSON carries arbitrary properties; the converter keeps names, descriptions, positions, heights and GPX times only. Polygons become lines. If you need everything, keep the original file.

Large files

Long recordings can have tens of thousands of points. The browser can handle files of several megabytes, but a very large file may take a few seconds to read. If a file is too heavy, split it or simplify the track in another tool first. The tool reports clear errors, such as a position outside the valid range or XML that is not well formed.

Limits

The converter does not change the datum, which is WGS 84 in all three formats, and it does not simplify or smooth tracks. It does not edit or merge files. Positions are written to six decimal places, about 0.1 metre, and heights to two decimals.

Checked against the current version of the GPX to GeoJSON Converter on .

Troubleshooting

The download did not start

Look for your browser’s download bar or icon. Some browsers ask once before a site may download files; allow it and click the button again.

Frequently asked questions

Why are my points in the wrong place after converting?

The usual cause is the order of the coordinates. GPX gives latitude and longitude as named attributes, but GeoJSON and KML list longitude first and then latitude. A tool that mixes them up puts a point somewhere else on Earth. This converter keeps each format's own order, so check any code you write against the same rule.

Is my track sent to a server?

No. The file is read as text in your browser, parsed and converted there, and the result is shown in the page. Nothing is uploaded, which matters for private routes such as a daily run that starts at your front door.

Is my track uploaded anywhere?

No. The file is read and converted in your browser, so private routes stay on your device.

What is lost in conversion?

Styles, icons, extensions such as heart rate, and time stamps when writing to GeoJSON or KML. Polygons are read as lines.

Keep working with the result

After you download, choose “Save to Workstand” to keep the result in a folder on your computer, attach it to a project and create a follow-up task. It is saved by your browser, not uploaded.