JSON to CSV / CSV to JSON Converter

Convert JSON arrays to CSV and CSV back to JSON. Paste your data, pick the direction, and get the converted output instantly. Handles quoted fields, commas in values, and nested-ish structures.

How to use

  1. Choose your conversion direction: JSON to CSV or CSV to JSON.
  2. Paste your data into the input box (or click Load Sample to try it).
  3. Click Convert and copy the output.
  4. For JSON to CSV, input must be an array of objects with consistent keys.

Moving data between APIs (which speak JSON) and spreadsheets (which use CSV) is a constant task in data work. Exporting an API response to a spreadsheet means converting JSON to CSV. Importing spreadsheet data into a database or API call often means going CSV to JSON. Both conversions are mechanical but doing them manually for anything larger than a few rows is tedious.

The converter handles the most common case: a JSON array of objects to a flat CSV table (each object becomes a row, each key becomes a column header). For the reverse, a CSV with headers becomes an array of objects. Nested JSON or non-uniform objects may need manual flattening before conversion.

Frequently Asked Questions

What happens with nested JSON objects in CSV conversion?

Flat CSV cannot represent nested structures. A nested object like {address: {city: 'Mumbai', pin: '400001'}} would either need to be flattened into address.city and address.pin columns, or the whole object stringified into one cell. This tool handles flat JSON arrays best.

Can I convert a CSV with thousands of rows?

Yes - the conversion runs in your browser and handles large files. Performance depends on your device, but CSV files up to a few MB process quickly without uploading to any server.

Does it preserve data types?

CSV is plain text - all values become strings. Numbers and booleans in JSON lose their types in CSV. When converting back from CSV to JSON, all values will be strings unless you post-process to restore types.

JSON to CSV Converter / CSV to JSON | ToolHaven