CSV ↔ JSON Converter

Convert between CSV and JSON instantly, in either direction

About this tool

The CSV ↔ JSON Converter converts in both directions instantly — paste CSV, get a JSON array of objects; paste a JSON array, get CSV. It correctly handles quoted fields containing commas, embedded quotes, and newlines per the standard CSV format, and supports comma, semicolon, tab, or pipe delimiters for exports from different regional spreadsheet settings. Upload a .csv file directly, or paste JSON and get CSV back — useful when an API returns JSON but you need to hand a spreadsheet to a non-technical teammate, or when you have a CSV export that needs to become structured JSON for a script or API payload. Runs 100% in your browser. Your data — including anything from a spreadsheet with sensitive rows — never leaves your machine.

When to use it

  • Converting a CSV export from Excel or Google Sheets into JSON for an API payload or script
  • Turning a JSON array from an API response into a CSV file to share with a non-technical teammate
  • Handling European-format CSVs that use semicolons instead of commas as the delimiter
  • Quickly inspecting the structure of a CSV file by seeing it as JSON objects with named keys

Tips

  • The first row of your CSV is always treated as the header row — those become the JSON object keys.
  • When converting JSON to CSV, the column headers are the union of all keys across every object, so it's fine if some objects are missing a field.
  • Nested objects or arrays inside JSON values are stringified into the CSV cell — CSV itself has no concept of nested structure.
  • Switch the delimiter to semicolon if you're opening the CSV in a European-locale version of Excel, which uses commas as decimal separators.

Frequently asked questions

How does the converter handle commas inside a CSV field?

Standard CSV wraps any field containing the delimiter, a quote character, or a newline in double quotes — e.g. "Smith, John" for a value containing a comma. This tool follows that convention on both parsing and export, so fields with embedded commas or quotes round-trip correctly as long as the source CSV was quoted properly.

What happens to nested JSON objects or arrays when converting to CSV?

CSV is inherently flat — it has no way to represent nested structure. When a JSON value is an object or array, it gets serialized as a JSON string inside that CSV cell (e.g. {"street":"Main St"}) rather than being flattened into separate columns. If you need flattened columns, restructure the JSON to be flat before converting.

Why do some rows have empty cells after converting JSON to CSV?

If your JSON array contains objects with different sets of keys, the CSV header row is the union of every key seen across all objects. Any object missing a particular key gets an empty cell in that column — this keeps every row the same width, which CSV requires.

Can I convert a CSV that uses tabs instead of commas (TSV)?

Yes — select Tab from the delimiter dropdown before pasting or uploading your file. The same parser handles comma, semicolon, tab, and pipe-delimited files; just make sure the selected delimiter matches your source file's actual separator.

Related tools

🥷 ToolNinja