Skip to content

JSON CSV Converter

Convert JSON arrays to CSV and back locally.

Converted
Converted JSON to CSV.

JSON CSV Converter turns a JSON array of objects into a spreadsheet-friendly CSV file, or parses CSV back into structured JSON, entirely inside your browser. It handles quoted fields, embedded commas, mismatched keys, and basic type inference without any server upload.

How it works

For JSON to CSV, the tool collects the union of keys across all objects to build a header row, then writes one row per object with proper CSV quoting. For CSV to JSON, it parses the CSV respecting quoted fields and infers numbers and booleans from plain text cells.

Benefits

  • Bidirectional conversion between JSON arrays and CSV
  • Correct CSV quoting for commas, quotes, and newlines
  • Automatic type inference when converting CSV back to JSON
  • Handles objects with missing or extra keys gracefully

Use cases

  • Export API JSON responses to CSV for spreadsheets
  • Import CSV exports from spreadsheets into JSON for scripts
  • Convert test fixtures between JSON and CSV formats
  • Clean up data before loading it into another tool or database

Best practices

  • Confirm your JSON is an array of objects before converting to CSV
  • Review the header row after conversion to ensure key names are as expected
  • Watch for stray quotes in source data before pasting as CSV
  • Validate numeric-looking strings you want to keep as text (like IDs) separately

Common mistakes

  • Pasting a single JSON object instead of an array of objects
  • Assuming CSV preserves nested objects or arrays (it does not—flatten first)
  • Forgetting that different row keys produce empty CSV cells, not errors
  • Not checking whether numeric-looking IDs should stay as strings

Privacy

All parsing and conversion logic runs locally in your browser. ToolHub never receives the JSON or CSV you paste unless you separately opt in to on-device history.

Frequently asked questions

What JSON shape does this tool expect?
For JSON to CSV, provide a JSON array of plain objects, like [{"name":"Ada"}]. Each object becomes one CSV row, and the union of all keys becomes the header row.
How are commas and quotes in values handled?
Any field containing a comma, quote, or newline is automatically wrapped in double quotes, and internal quotes are doubled (\"\") per standard CSV escaping rules.
What happens if objects have different keys?
The header row includes every key found across all objects. Rows missing a given key get an empty cell in that column instead of an error.
How does CSV to JSON handle data types?
Cells that look like whole or decimal numbers convert to JSON numbers, "true"/"false" convert to booleans, and everything else stays a string.
What happens if I paste invalid JSON or malformed CSV?
The tool shows a specific error—invalid JSON syntax errors for JSON to CSV, or a header/row issue for CSV to JSON—so you can fix the input and try again.
Does this tool upload my data?
No. Parsing and conversion run entirely in your browser using plain JavaScript; nothing is sent to ToolHub or any server.
Can I convert a JSON object that is not an array?
No. JSON to CSV requires an array of objects since each object maps to one row. Wrap a single object in square brackets if needed.

Version 1.0.0 · Updated 2026-07-27 · 1 minute