GPX vs KML vs GeoJSON: which location file format should you use?
If you have ever tried to move places or a route from one app to another, you have probably hit a wall of file formats: GPX, KML, KMZ, GeoJSON. They all describe points and lines on a map, but they were each born in a different world. Here is what each one is for and how to pick.
GPX — the GPS standard
GPX (GPS Exchange Format) is an XML format built for GPS devices and outdoor apps. It is the lingua franca of hiking, cycling, and running: waypoints, routes, and recorded tracks with timestamps and elevation. If you are dealing with a Garmin, a fitness app, or a trail platform, GPX is almost always the safe choice.
- Best for: trails, waypoints, recorded tracks, fitness and handheld GPS devices.
- Strength: universal support across outdoor and GPS tools.
KML / KMZ — the Google Earth format
KML (Keyhole Markup Language) was created for Google Earth and is also XML. It goes beyond plain geometry to carry styling — colors, icons, labels, even folders of places. KMZ is simply a zipped KML (often bundling custom icons), so it is smaller to share.
- Best for: sharing styled maps, saved places, and overlays with people who use Google Earth or Google My Maps.
- Strength: rich presentation — it remembers how things should look.
GeoJSON — the format the web speaks
GeoJSON is plain JSON, which makes it the native language of web maps and developers. Every feature is an object with a geometry (point, line, polygon) and free-form properties. If you are wiring data into a website, a dashboard, or a mapping library, GeoJSON is the path of least resistance.
- Best for: developers, web maps, data pipelines, and anything programmatic.
- Strength: simple, readable, and trivial to parse in code.
So which should you use?
- Heading into the outdoors or moving data to a GPS device → GPX.
- Sharing a nicely styled set of places with non-technical people → KML/KMZ.
- Feeding a website or writing code → GeoJSON.
How to convert between them
You rarely get to choose the format your data arrives in — but converting is easy when a tool reads one and writes another. With My Location you can import a file in any of the three formats and then export your places and routes in whichever one the next tool needs. Bring in a GPX track, send it back out as KML; drop in a GeoJSON file, hand it on as GPX. It all stays in your browser.
Once your places are in, you can also organize them on a personal map or sketch a quick route. See the full feature list for everything import/export can do.