consolelog.tools

JSON to CSV

Convert JSON to CSV live — accepts an array of objects, a single object, or primitives; optional lenient JSON, custom delimiter, quoting & header.

About this ToolHow it works, benefits & use cases

Flatten JSON into CSV, generated live as you paste. The converter accepts an array of objects, a single object, or an array of primitive values, so you are not forced to reshape your data first — a lone object is treated as one row, and a list of strings or numbers becomes a single column. Output is produced with PapaParse, which derives the column header from the object keys and properly escapes fields that contain the delimiter, quotes or line breaks. You choose the delimiter (comma, semicolon, tab or pipe), whether to emit a header row, and whether to quote every field for maximum safety in strict consumers. A lenient input mode lets you feed in near-JSON — single quotes, trailing commas and comments are repaired before conversion. Line endings are normalised to Unix newlines, and the result reports row and field counts. Copy it, download it as .csv, or share it — all processed locally in your browser.

How to Use

  1. 1Pick a delimiter: comma, semicolon, tab or pipe.
  2. 2Toggle "Header row" to include or omit the column-name line, and "Quote all fields" if you want every value wrapped in quotes.
  3. 3Enable "Repair (lenient)" if your JSON contains comments, trailing commas or single quotes.
  4. 4Paste your JSON into the input panel — the CSV appears live — or click "Load example".
  5. 5Press "Convert to CSV", then copy the result, download it as output.csv, or share it via URL.

Key Benefits

  • Accepts an array of objects, a single object, or an array of primitives
  • PapaParse output escapes delimiters, quotes and newlines inside fields
  • Choice of comma, semicolon, tab or pipe delimiter
  • Optional header row and optional quoting of every field
  • Lenient mode repairs comments, trailing commas and single quotes
  • Unix line endings and a row/field count summary
  • Live conversion with copy, .csv download and sharing — all in-browser

Common Use Cases

  • Exporting an array of API result objects to a spreadsheet-ready CSV
  • Generating a tab- or semicolon-separated file for a locale-specific import
  • Turning a single JSON object into a one-row CSV
  • Producing a single-column CSV from an array of IDs or strings
  • Converting hand-edited JSON5-style data into CSV via repair mode

Options

Accept comments / trailing commas / single quotes

0 characters · live

Paste JSON above to see the CSV live.

Was this tool helpful?

Share Your Experience

Help others discover this tool!

Related tools