Skip to tool

CSV ↔ JSON Converter

Input
Output

The converted JSON or CSV

Off keeps leading zeros and long IDs as strings.

Convert CSV to JSON and JSON to CSV

Paste text or drop a .csv, .tsv, .json, .jsonl or .ndjson file up to 10 MB. Pick CSV → JSON or JSON → CSV with the tabs; a dropped file selects the direction from its extension. With the Auto delimiter, the tool reads the first line and picks the comma, semicolon, tab or pipe that occurs most. Text input is capped at 1,000,000 characters. Copy the result or download it as .csv, .json or .jsonl.

CSV to JSON

Pick the delimiter (comma, semicolon, tab, pipe or any single character) and whether the first row is a header. With a header row, each line becomes an object keyed by the column names; without one, you get an array of arrays. Output can be pretty-printed with 2-space indentation, minified, or written as NDJSON with one object per line. Values stay strings unless you turn on type inference, which converts 42 and -3.5 to numbers, true and false to booleans, and null to null.

JSON to CSV

The input must be a JSON array of objects, an array of arrays, or NDJSON. Columns are the union of all object keys in the order they first appear, and missing keys become empty cells. Nested objects are flattened with dot paths by default, so {"address": {"city": "Paris"}} becomes an address.city column; arrays are written as JSON text in one cell. Choose LF or CRLF line endings and whether to quote every field.

RFC 4180 quoting rules

Both directions follow RFC 4180. A field that contains the delimiter, a double quote, or a line break is wrapped in double quotes, and a quote inside it is written twice: the value say "hi" becomes "say ""hi""". Quoted fields can span several lines, empty trailing fields are kept, and an unclosed quote is reported as an error.

FAQ

Will type inference break IDs and ZIP codes?

No. Even with inference on, values with a leading zero such as 0731 or 00123 and integers longer than 15 digits stay strings, because converting them to numbers would lose digits. Inference is off by default, so every value is a string unless you enable it.

How are nested JSON objects represented in CSV?

Either flattened into dot-path columns (address.city, address.zip) or kept as a JSON string in a single column. Pick the one that matches what your spreadsheet or import tool expects.

Why do I get an error for a single JSON object?

JSON to CSV needs an array at the top level, since each element becomes a row. Wrap a single object in square brackets, as in ['{"name": "Alice"}'], or switch the source to NDJSON if you have one object per line.

Is NDJSON (JSON Lines) supported?

Yes. Set the JSON source to NDJSON / JSONL when each line is its own JSON object, or pick NDJSON as the output mode to write one object per line. Blank lines are skipped, and an invalid line is reported by number.

Why does Excel show garbled characters in the downloaded CSV?

The file is saved as UTF-8 without a byte order mark, and some Excel versions then open it in a legacy encoding, which breaks accented and CJK characters. Import it with Data > From Text/CSV and choose UTF-8 instead of double-clicking the file. In locales that use a comma as the decimal separator, Excel also expects semicolon-delimited CSV.

How do I convert an Excel sheet to JSON?

Copy the cells in Excel and paste them here: Excel copies them as tab-separated text, which the Auto delimiter detects. You can also save the sheet as CSV UTF-8 and drop the file. Either way you get the values as Excel displays them, not the formulas, and only one sheet at a time.