geojsonkit.org
GeoJSON utilities, in the browser
Say hi →

GeoJSON to CSV

Flatten a GeoJSON FeatureCollection into a CSV: one row per feature, columns for every property plus lng, lat (for points), and wkt for arbitrary geometry.

GeoJSON to CSV

updated 8 June 2026

Drop a .geojson file, or

What this tool does

It turns GeoJSON into a flat CSV table — one row per feature, one column per property — so you can open spatial data in Excel, Google Sheets, or load it into a database. Paste raw JSON or drop a .geojson (or .json) file onto the page, click Convert, and the result appears in the output pane ready to Copy CSV or Download .csv.

It accepts a FeatureCollection, a single Feature, or even a bare geometry (a lone Point or Polygon with no wrapper — it gets treated as a feature with empty properties). Everything runs locally in your browser: I never see your data, and the page works offline once loaded. Going the other way? CSV to GeoJSON handles the reverse.

How this tool works

One click on Convert runs three passes over your features, entirely in your browser. First it parses the text; if that fails, the status bar shows JSON parse error. and nothing is written. On success it reports Converted to CSV.

1. Flatten properties into columns

The tool scans every feature and collects the union of all keys found in its properties object. Those keys become the leading CSV columns, in the order they were first seen. Because it's a union, a key that exists on only some features still gets a column — features that lack it simply get an empty cell. Property values are written as-is; a nested object value is stringified into a single cell rather than split into sub-columns.

2. Add the geometry columns

After the property columns, it appends three fixed columns: lng, lat, and wkt. For a Point geometry, lng is filled with coordinates[0] and lat with coordinates[1] — remember GeoJSON coordinates are [longitude, latitude], so longitude comes first. For every other geometry type (lines, polygons, multi-geometries), lng and lat stay empty because there's no single point to put there.

3. Emit the CSV

Every geometry — Point or not — is also serialized into the wkt column as Well-Known Text, e.g. POINT(0 0), LINESTRING(...), or POLYGON(...). As each cell is written, any value containing a comma, double-quote, or newline is wrapped in double-quotes, with internal quotes doubled — standard RFC 4180 escaping. The finished string lands in the output pane; Download saves it as features.csv.

Example

Input (GeoJSON Feature):

{
  "type": "Feature",
  "geometry": { "type": "Point", "coordinates": [-122.4, 37.7] },
  "properties": { "name": "Coffee Shop", "rating": 4.5 }
}

Output (CSV):

name,rating,lng,lat,wkt
Coffee Shop,4.5,-122.4,37.7,"POINT(-122.4 37.7)"

The geometry is split into simple lng/lat columns for the point, while the full wkt string carries the same shape in a form spatial databases can read directly.

Tips & common pitfalls

  • WKT is your friend. The wkt column is a standard format — you can import this CSV straight into QGIS, PostGIS, or DuckDB's spatial extension and have the geometries recognized instantly.
  • lng/lat only fill for points. For polygons, lines, and multi-geometries those two cells stay empty, since those shapes have no single coordinate pair. The full shape still lives in wkt.
  • Nested properties get stringified. A value like "owner": {"name": "Bob"} lands in one cell as text rather than becoming an owner.name column. Flatten your JSON first if you want sub-keys as their own columns.
  • Coordinate order is [longitude, latitude]. Per RFC 7946, longitude comes first. The columns are named lng and lat to keep that unambiguous.

Troubleshooting

The status bar says "JSON parse error."

The input isn't valid JSON — a trailing comma, an unclosed bracket, a smart quote, or a stray Byte Order Mark from a Windows editor. Fix the syntax (the Validator can pinpoint it) and convert again.

I pasted a bare geometry and the CSV has no property columns.

That's expected. A bare geometry (a lone Point or Polygon without a Feature wrapper) is treated as a feature with empty properties, so you get only the lng, lat, and wkt columns. Wrap it in a Feature with a properties object if you want attribute columns too.

My CSV looks shifted in Excel.

The output uses standard commas and RFC 4180 quoting for cells with special characters. If columns look misaligned, a property value probably contains a line break, which some older CSV parsers handle poorly — open it in a more recent version, or in Google Sheets.

FAQ

How are columns ordered?

All unique properties keys across every feature come first, in first-seen order, followed by the three fixed spatial columns: lng, lat, then wkt.

What happens to complex geometries like MultiPolygons?

They're fully preserved in the wkt column. lng and lat stay empty, but the wkt cell carries the complete Well-Known Text (e.g. MULTIPOLYGON(((...)))), which most GIS software reads perfectly.

Does this handle commas inside values?

Yes. Any value or header containing a comma, double-quote, or newline is wrapped in double-quotes, and internal quotes are doubled — RFC 4180 escaping — so the CSV structure stays intact.

Is there a file size limit?

No hard limit, but the whole conversion runs in your browser's RAM, so very large collections (200 MB+) can make the tab sweat as it builds the CSV string. Split a massive dataset into chunks first.

Is my data sent to a server?

Never. The conversion is 100% JavaScript running on your machine, and the page works offline once loaded — your coordinates never leave your computer.