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. For a GPS device or trail platform, check which GPX elements it accepts: support for recorded tracks does not automatically include saved waypoints or planned routes.
- 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.
Coordinate order: an easy mistake to avoid
A coordinate written for a map search usually uses latitude, then longitude: 40.7128, -74.0060. GeoJSON reverses that order: [-74.0060, 40.7128]. KML coordinate tuples also put longitude first. GPX uses named lat and lon attributes. Check the destination format rather than copying the same pair unchanged. See the GeoJSON position specification.
What My Location preserves
- Saved places: GPX retains coordinates, names, notes and available saved timestamps. GeoJSON and KML retain additional supported My Location fields such as categories, marker color, pinned status and alert radius.
- Drawn routes: exported lines describe the chosen shape. They do not invent timestamps, elevation or turn-by-turn directions.
- Recorded GPX tracks: the track import/export workflow retains available point times and elevation. A recorded track’s GPX export is separate from the Pro saved-place export.
- KML and GeoJSON imports: supported points become places and lines become routes. Polygon areas, embedded overlays, full styling and recorded-track timing are not preserved by this workflow.
KMZ is a compressed package, not simply a different name for plain KML text. Extract its KML first if the importer does not accept the package. Keep the original file and inspect a small sample before converting a large collection.
How to convert between them
With Pro, My Location can import supported GPX, KML and GeoJSON content and export saved places and drawn routes. Choose a format for the information you need to retain, not just the file extension. This is a practical place-and-route workflow, not a lossless converter for every feature in the standards.
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.