GeoJSON ↔ CSV
Convert GeoJSON Point features to CSV rows and back. LineString/Polygon geometries export as a flattened coordinate list (one-way; CSV->GeoJSON always builds Points). CSV parsing is fully quote-aware (src/csv.ts), so a quoted field holding a comma or a newline no longer shifts the coordinate columns. Runs on your device.
Runs on your device. The file is never uploaded.
GeoJSON to CSV writes one row per feature, with lat and lon first, then a column for each property key present, then geometry_type. The latField and lonField options rename those two columns and default to lat and lon. A LineString or Polygon flattens into the geometry_type cell and never comes back, because csv-to-geojson only builds Points.
Questions
Which direction does it convert?
Both, chosen with the mode option: geojson-to-csv, the default, or csv-to-geojson. The latField and lonField options name the coordinate columns and default to lat and lon. Drop a file, pick the direction, and the result is printed as text on the page for you to copy.
What columns come out of a GeoJSON file?
The lat and lon columns first, then one column for every property key found across all the features, then a geometry_type column. A feature missing a property gets an empty cell. The input can be a single Feature or a FeatureCollection; anything else is refused with "expected a GeoJSON Feature or FeatureCollection".
What happens to lines and polygons?
They are exported but do not round trip. A LineString or Polygon leaves lat and lon empty and has its coordinates flattened into the geometry_type cell, as the type name followed by lat,lon pairs separated by spaces. A Polygon contributes its first ring only. Going the other way always builds Points, one per CSV row.
Does it handle commas inside quoted CSV fields?
Yes. Parsing goes through the shared quote-aware CSV reader, so a field such as "Smith, John" stays one value and does not shift the coordinate columns. That was a real bug once: a naive split on commas put a null longitude into output that claimed to be GeoJSON.
Why does it say my CSV header is missing columns?
Because no header cell matches latField or lonField. The message names both, saying the header must include "lat" and "lon" columns. Header cells are trimmed but matched exactly and with case, so Latitude, LAT and lat are three different names. Set the two options to whatever your file calls them.
Do property values keep their types?
Not going from CSV to GeoJSON. Every non-coordinate column becomes a string property, so a population of 1000 arrives as "1000". Only the coordinates are turned into numbers. In the other direction values are written out with a plain string conversion, so a nested object or array will not survive in a useful form.