Skip to content
Back

CSV ↔ JSON Converter

Convert CSV to JSON and JSON back to CSV.

Turn spreadsheet data into JSON, or JSON into a CSV file

The CSV ↔ JSON Converter works in both directions. CSV → JSON turns rows exported from Excel, Google Sheets or a database into a list of JSON objects. JSON → CSV flattens a list of objects into rows you can open in a spreadsheet.

Quoted fields follow the usual CSV rules (RFC 4180), and anything the converter has to adjust — a renamed header, a short row — is listed as a warning instead of being changed quietly. The data is converted in your browser; neither the text nor an opened file is uploaded.

How to convert CSV to JSON or back

  1. Choose CSV → JSON or JSON → CSV at the top.
  2. Paste your data, or click “Open a file…” to load a .csv, .tsv, .txt or .json file of up to 20 MB. Opening a .json file switches to JSON → CSV, and a .tsv file sets the delimiter to Tab.
  3. Set the Delimiter (comma, semicolon, tab or pipe) and whether the first row is a header.
  4. For CSV → JSON, tick “Detect numbers, true/false and empty cells (→ null)” if you want typed values instead of text.
  5. Click Convert, read any warnings, then Copy the output or download it as converted.json or converted.csv.

How rows and values come out

  • With a header row, each line becomes an object keyed by the header names. Without one, you get a list of arrays.
  • Values stay text by default, exactly as written, including leading and trailing spaces. Header names are trimmed.
  • Quoted fields may contain the delimiter, line breaks and doubled quotes (""). Blank lines are skipped.
  • Blank or repeated headers are renamed (column_3, name_2) and each rename is listed as a warning.
  • Ragged rows: missing values are filled in as empty, and extra values are kept under names such as column_6.

Typical conversions

  • Feeding an app or API with data someone keeps in a spreadsheet.
  • Opening API output in Excel: convert a JSON response to CSV to sort and filter it. Downloaded CSV files start with a UTF-8 byte order mark, so Excel shows accented and non-Latin characters correctly.
  • European spreadsheets that export with semicolons instead of commas.

What type detection changes

  • Numbers are converted only when written plainly, like 42, -7 or 3.14, and when they have 15 significant digits or fewer, so the value is kept exactly.
  • Codes stay text: leading zeros (007, 01234), -0, exponents, thousands separators and long IDs are left as strings.
  • true and false in lowercase become booleans; TRUE or Yes stay text.
  • Empty cells become null rather than an empty string.

CSV ↔ JSON Converter: common questions

How are nested objects handled when converting JSON to CSV?

They are flattened into dot-separated column names, so {"address": {"city": "Oslo"}} gives a column called address.city. Arrays are written into a single cell as JSON text, and a warning tells you when that happened.

What JSON shapes can be turned into CSV?

A list of objects, a single object, a list of arrays (each array becomes a row) or a list of plain values (one column called value). A list that mixes objects and other items is rejected with an explanation.

Why do I get “A quoted field … is never closed”?

A field starts with a double quote that has no matching closing quote, so the rest of the file would be read as one value. Find the line it names and add the missing ", or write a literal quote inside a quoted field as "".

Does it detect the delimiter automatically?

No — choose it from the list. If every record ends up in a single field, the delimiter is probably wrong. Changing an option after converting runs the conversion again.

Can I check or reformat the JSON afterwards?

Yes. The output is already indented with two spaces; paste it into the JSON Formatter to change the layout. To tidy messy CSV first, the Text Cleaner removes stray spaces and duplicate lines.