How to Open a GeoJSON File and Convert It to Something Else
What to do with a .geojson file you cannot open, how to check it is valid, and which conversions keep which information.
What to do with a .geojson file you cannot open, how to check it is valid, and which conversions keep which information.
- GeoJSON to CSV: keeps coordinates and attributes, loses nested geometry — a polygon becomes one row per ring or is reduced to its centroid, depending on the tool.
- GeoJSON to KML: keeps geometry and can carry styling into viewers, but loses the flat property structure that made it interoperable.
- GeoJSON to GPX: only makes sense when the geometry is a LineString, because GPX models tracks and waypoints rather than polygons.
- GeoJSON to WKT: useful for databases, but WKT carries geometry only — attributes are lost unless exported separately.
A GeoJSON file is plain text containing JSON, so it will open in any text editor — but a wall of coordinate arrays tells you nothing about whether the geometry is right. The practical workflow is to open it in a GeoJSON viewer first, confirm the shapes appear where you expect, then convert only if you need another format. Opening it as text is a debugging step, not a viewing step.
First, check that it is valid
The specification is short and the common errors are repetitive: an object that is not one of the seven geometry types, a FeatureCollection whose features array is missing, coordinates stored as strings rather than numbers, and positions written as [latitude, longitude] instead of [longitude, latitude]. A validator names the specific problem and the path to it, which is far faster than reading the file.
What each conversion costs you
- GeoJSON to CSV: keeps coordinates and attributes, loses nested geometry — a polygon becomes one row per ring or is reduced to its centroid, depending on the tool.
- GeoJSON to KML: keeps geometry and can carry styling into viewers, but loses the flat property structure that made it interoperable.
- GeoJSON to GPX: only makes sense when the geometry is a LineString, because GPX models tracks and waypoints rather than polygons.
- GeoJSON to WKT: useful for databases, but WKT carries geometry only — attributes are lost unless exported separately.
Size problems
A boundary file with full-resolution detail can be tens of megabytes, which is too large for a web map. A simplifier reduces coordinate density while keeping the shape recognisable, and a minifier strips whitespace without changing geometry at all. Try minification first — it is lossless — and simplify only if the file is still too large.
Measuring what is inside
Once a GeoJSON file loads, the useful follow-up questions are quantitative: how many features, how many coordinates, what is the bounding box, what is the area of each polygon. Those calculations belong to the geometry, not the view, so they run on the file rather than on the rendered map — which is exactly why the GeoJSON area calculator is a separate page from the map area calculator.
Continue with the actual map tools
About the author
Aryan Khan edits MapBench with a focus on practical map calculations, coordinate systems, routing concepts, open geographic data and clear limitations. Guides are written to help a reader make a better decision, not just to repeat a definition.
Related reading
The Right Format for Every Job: GPS Files in Real Life
KML from Google My Maps, GPX from the bike computer, GeoJSON from the analyst — a practical workflow for converting without losing what matters.
KML vs. GeoJSON vs. GPX: Choosing the Right Map File Format
The practical differences between three common geographic file formats — when to use each, what can be lost in conversion, and how to move between them.