JSON to CSV / CSV to JSON Converter
Convert JSON arrays to CSV and CSV to JSON, with nested keys and Excel support
| # | id | name | city | address.pin | address.state | active | phone |
|---|---|---|---|---|---|---|---|
| 1 | 1 | Asha Patel | Ahmedabad | 380001 | Gujarat | true | |
| 2 | 2 | Ravi "RK" Kumar | Pune | 411001 | Maharashtra | false | |
| 3 | 3 | Meera Iyer | Chennai, Tamil Nadu | 600001 |
Runs entirely in your browser. Nothing you type or upload is sent to us or stored.
Results are for general guidance. Please check anything important before relying on it. Terms of use
How to Use
- Choose the direction at the top: JSON โ CSV or CSV โ JSON.
- Paste your data into the input box, or tap Open a .json or .csv file (the direction is picked automatically from the file's contents).
- Set the options: the delimiter (comma, semicolon or tab), and for CSV โ JSON whether to detect numbers, true/false and null and whether to nest dot headers back into objects.
- The result appears as you type, with a Table preview of the first 50 rows below. Any problem, such as invalid JSON or an unclosed quote, is explained in red.
- Tap Copy or Download to save a .csv or .json file. Convert back sends the output the other way so you can check the round trip.
JSON and CSV in one minute
JSON is the format APIs and apps use to exchange data: objects in curly braces, lists in square brackets, values that can be nested. CSV (comma-separated values) is a plain table, one row per line, that opens directly in Excel, Google Sheets, LibreOffice and almost every database import screen. Converting JSON to CSV lets you open an API response or an app export in a spreadsheet; converting CSV to JSON turns a spreadsheet into data that code can use.
How JSON becomes a table
Each object in the JSON array becomes one row. The column headers are every key found in any object, in the order they first appear, so an object that's missing a key just gets an empty cell. Nested objects are flattened with dot notation, and arrays are written into a single cell as JSON text.
{"id":2, "name":"Ravi \"RK\" Kumar", "address":{"city":"Chennai, TN","pin":"600001"}}]
id,name,address.city,address.pin
1,Asha Patel,Ahmedabad,380001
2,"Ravi ""RK"" Kumar","Chennai, TN",600001
Look at the second row. "Chennai, TN" contains a comma, so it's wrapped in double quotes, and the quotes around RK are doubled. That's the CSV quoting rule, explained next. When you convert back with Nest dot headers switched on, address.city and address.pin become an address object again.
The CSV rules (RFC 4180)
CSV has no single official standard, but RFC 4180 (published in 2005) describes the format that Excel and most tools follow, and this converter uses it:
- Each record is on its own line; lines end with CRLF (the converter accepts LF or CR as well).
- The first line can be a header row with the column names.
- A field that contains the delimiter, a double quote or a line break must be enclosed in double quotes.
- A double quote inside a quoted field is written as two double quotes:
"6"" ruler"means6" ruler.
Fields are quoted only when needed, so the output stays clean. A quoted field can span several lines, which is how addresses and notes with line breaks survive the trip.
Which delimiter to choose
| Delimiter | Use it when |
|---|---|
Comma , | The default for .csv files. Excel on Windows set to an Indian or US region expects commas. |
Semicolon ; | The file will be opened by Excel in a region that uses a comma as the decimal point, such as Germany or France. |
| Tab | You want to paste into a spreadsheet (tabs split into columns automatically) or your data is full of commas. Saved as .tsv. |
For CSV โ JSON, Detect automatically picks whichever of the three appears most often in the header row.
Number, true/false and null detection
CSV has no types; every cell is text. With detection on, 42 and -1.5 become JSON numbers, true/false (any case) become booleans and null becomes null. So that data isn't changed behind your back, values stay as text when converting would alter them: anything with a leading zero (007, 0612), a plus sign (+919876543210), thousands separators, or a whole number too long for JavaScript to store exactly (beyond 9,007,199,254,740,991). Ten-digit mobile numbers without a prefix do become numbers; switch detection off if you want every value kept as text.
Opening the CSV in Excel: common problems
- โน shows as รขโยน or Hindi text is garbled: Excel needs a byte order mark (BOM) to recognise UTF-8. Keep Excel-friendly download switched on.
- Leading zeros disappear: Excel turns
007into 7 when you double-click a CSV. Import it instead with Data > From Text/CSV and set that column's type to Text. - Long numbers turn into 1.23457E+11: Excel shows numbers with more than 11 digits in scientific notation and keeps only 15 significant digits, so a 16-digit card or account number loses its last digit. Import such columns as Text too.
This JSON to CSV converter runs in your browser, so customer lists, bank exports and other sensitive files are never uploaded.