JSON to CSV Converter

Paste text or open a file in either box to convert between a JSON array and CSV. Nested fields are flattened with a warning, and downloaded CSV gets a BOM so Excel shows non-English text correctly.

Delimiter

When converting CSV to JSON, plain numbers and lowercase true and false become numbers and booleans. Numbers that start with 0, like 007, and integers beyond the exact range stay strings. Turn it off to keep everything as strings.

The BOM is added only to the downloaded file, never to copied text.

Indent

How to Use

  1. Paste a JSON array into the top box to get CSV below, or paste CSV (copying straight from a spreadsheet works) into the bottom box to get JSON above. No direction switch needed. The first CSV row holds the column names, and each row becomes one object.
  2. You can also click “Choose a file” or drop a file (up to 5 MB) into either box. .json files go into the JSON box and .csv or .tsv files into the CSV box automatically, and .tsv also switches the delimiter to Tab. Non-UTF-8 files fall back to Windows-1252 on English pages, and you can switch the encoding manually.
  3. Each box has a “Download” button that saves with LF line endings. Opened files keep their original base name with a .json or .csv extension; pasted text downloads as data.json or data.csv. Downloaded CSV gets a BOM by default so Excel recognizes UTF-8; turn it off in the settings if your import doesn't accept it. Text copied with “Copy” never includes the BOM.
  4. Choose a comma, Tab, or semicolon delimiter. When you paste CSV, the tool suggests a delimiter based on the content (for example a semicolon, common in Europe) but never switches by itself. Click the button next to the suggestion to apply it.
  5. Turn off “First row is the header” to get an array per row, so the first row of data isn't treated as column names. In that mode the JSON root must be an array of arrays to convert back to CSV.
  6. When converting JSON to CSV, the root must be an array of objects. Nested objects are flattened into column names like address.city and arrays into tags.0, tags.1, with each flattened column name listed. Columns are merged in order of first appearance and missing fields stay empty. Converting CSV to JSON rebuilds that nesting by default, and you can turn it off.
  7. CSV to JSON detects numbers and booleans by default: plain numbers and lowercase true and false become real types, while numbers that start with 0, like 007, and integers beyond the exact range stay strings. Turn off “Detect numbers and booleans” to keep every value a string. Empty cells are always empty strings.
  8. Rows whose column count differs from the header, duplicate column names, and null values written as empty cells each produce a warning with the row number or path. Syntax errors show the line and column and keep the other box's last valid output.
  9. For other pairs, such as YAML to TOML or CSV to XML, use the Data Format Converter: pick any two of JSON, YAML, TOML, INI, .env, properties, CSV, and XML for its two boxes. You'll find it in the related tools below this page.

FAQ

Why does the downloaded CSV show garbled text in Excel, and how do I avoid it?

When Excel opens a CSV with no marker, it reads it using the system's legacy encoding, but this tool writes UTF-8, so Chinese, Japanese, and accented characters turn into garbage. A UTF-8 BOM at the start of the file tells Excel to read it as UTF-8. This tool adds the BOM to downloaded CSV by default, so double-clicking the file just works. If your own program or import pipeline rejects a BOM, turn off “Add a BOM when downloading CSV” in the settings. Text copied to the clipboard never includes a BOM.

Why do a zip code like 007 and a phone number like 0912345678 come out as strings in JSON?

A leading 0 carries meaning, and converting to a number would drop it: 007 becomes 7 and 0912345678 becomes 912345678, which corrupts the data. So when converting CSV to JSON, multi-digit numbers that start with 0 stay strings. Long integers beyond what JavaScript can represent exactly, such as 20-digit IDs, also stay strings so the last digits aren't changed. Only plainly written numbers like 0, 0.5, 123, -3, and 1e5 become numbers, lowercase true and false become booleans, and True or TRUE stay strings. To keep everything as a string, turn off “Detect numbers and booleans”.

Which file extensions and text encodings are supported, and how are download names chosen?

Files up to 5 MB are supported. .json, .jsonc, and .json5 files route to the JSON box, and .csv and .tsv files route to the CSV box; unrecognized extensions stay in the box you chose with a notice. Files are read strictly as UTF-8 (stripping any BOM) first, falling back to Windows-1252 on English pages, with a selector to re-read as UTF-8, Big5, Shift_JIS, or Windows-1252. Downloads keep your original filename with .json or .csv, or default to data.json / data.csv.

What happens to nested JSON in CSV, and does it round-trip?

CSV is a flat table, so nested objects are flattened into dotted column names: {"address": {"city": "Taipei"}} becomes the column address.city, and arrays use their index, like tags.0 and tags.1. Every flattened column name is listed in the warnings. Converting that CSV back to JSON rebuilds the original objects and arrays by default, so the structure is unchanged. If your column names legitimately contain dots, turn off the nesting option and they are kept as plain keys.

Why can't a JSON root that isn't an array be converted to CSV, and what happens to null?

Each CSV row is one record, so the root must be an array of objects, like [{"id": 1}, {"id": 2}]. For a single object, wrap it in [ ] first. CSV has no way to write null, so it becomes an empty cell with a warning naming the row and path, and converting back gives an empty string rather than null.

How do I convert tab- or semicolon-separated files, or data with no header row?

Pick the delimiter in the settings: comma, Tab (TSV), or semicolon (common in European Excel). The tool suggests one when you paste, and opening a .tsv file switches to Tab automatically. For data without a header, turn off “First row is the header” to get an array per row; rows whose column count differs from the first row get a warning with the row number.