GeoJSON vs KML vs GPX vs CSV

Four formats show up again and again in GIS work. Here is what each one is actually for, so you can pick the right one and convert with confidence.

Geospatial data travels in many containers, but four cover the vast majority of everyday work: GeoJSON, KML, GPX and CSV. They are not competitors so much as tools for different jobs. Knowing which is which saves a lot of frustration.

GeoJSON โ€” the format of the web

GeoJSON is JSON with an agreed structure for geometry. A file contains features, each with a geometry (point, line, polygon and their multi- variants) and a bag of properties. It is the native language of web maps, JavaScript mapping libraries and modern spatial APIs.

KML โ€” the language of Google Earth

KML (Keyhole Markup Language) is an XML format created for Google Earth and still the standard for it. It carries not just geometry but styling: colours, icons, labels and 3D extrusions.

GPX โ€” the format of GPS devices

GPX (GPS Exchange Format) is an XML format built for tracks, routes and waypoints. If you record a hike, ride or survey path on a handheld GPS or phone app, you almost certainly get a GPX file.

CSV โ€” the humble spreadsheet

A CSV with latitude and longitude columns is the lowest common denominator. It is not really a spatial format, but everyone can open it, and it is the easiest way to move a list of points in and out of a spreadsheet or database.

Quick decision guide

Converting between them

Because these formats overlap in what they can hold, converting is usually straightforward for points and lines. The main things to preserve are coordinate order (lon/lat for GeoJSON) and, where possible, feature properties. Our format converter reads any of the four, detects the source automatically, and writes the target format entirely in your browser so your data is never uploaded.

Try it: convert between GeoJSON, KML, GPX and CSV with the free Format Converter.