CSV ↔ JSON without a server

How tabular data is parsed and serialized locally using PapaParse.

What you can do

  • Turn a CSV file into JSON (array of row objects).
  • Turn JSON (array or object shape we support) back into CSV for Excel or other tools.

How it works (simple)

CSV → JSON

  1. Read the file as text in the browser.
  2. Parse rows and headers with a CSV parser.
  3. Build a JSON structure and stringify it for download.

JSON → CSV

  1. Parse the JSON text.
  2. Flatten rows into columns.
  3. Write CSV text with proper quoting for commas and quotes in cells.

What runs in your browser

We use Papa Parse — a well-known JavaScript CSV library that runs entirely client-side. It handles headers, delimiters, and escaping rules that are easy to get wrong by hand.

Official docs: Papa Parse documentation

Tradeoffs and limits

  • Odd CSV dialects: Very unusual separators or encodings might need manual cleanup first.
  • Huge files: Multi-hundred-megabyte CSVs can stress browser memory even though we never upload them.
  • Nested JSON: Deeply nested JSON may not map cleanly to a flat CSV; simple tables work best.

See also