JSON to CSV Converter
Convert JSON to CSV and CSV back to JSON in your browser. Nested keys are flattened into columns, delimiters are detected, and nothing is uploaded.
How to use the JSON to CSV converter
- Choose the direction: JSON → CSV or CSV → JSON.
- Paste your data into the input box, or click Open a file to load a
.json,.csvor.tsvfile from your computer (up to 10 MB). - Pick a Delimiter. When reading CSV, Auto-detect usually finds the right one; when writing CSV, Auto-detect uses a comma.
- Adjust the options for the current direction, then click Convert. The result also updates as you type.
- Copy the result or download it. Swap direction moves the output back into the input so you can convert it the other way.
From JSON to CSV
A CSV file is a flat table: one header row with column names and one line per record. JSON is a tree, so the converter has to decide how records and nested values become rows and columns.
- An array of objects becomes one row per object. The columns are the union of all keys, in the order they first appear, so an object that lacks a key simply gets an empty cell.
- An object with a single array property, such as
{"items": [ … ]}, a common shape for API responses, is unwrapped and each item becomes a row. Any other object becomes a single row. - An array of arrays is already a table and is written as it is, without a header row.
- With Flatten nested keys (address.city) turned on, nested objects become dotted column names:
{"address": {"city": "Lyon"}}produces a columnaddress.city. Arrays get index columns:tags.0,tags.1… With the option off, nested values are written into a single cell as JSON text.
Values that contain the delimiter, quotes or line breaks are quoted following RFC 4180, the format that Excel, LibreOffice and Google Sheets all read. null becomes an empty cell.
Spreadsheet formula protection
A cell that starts with =, +, - or @ can be run as a formula when the CSV is opened in a spreadsheet. This is known as CSV injection. If your data comes from users or other untrusted sources, turn on Protect against spreadsheet formulas: such text cells are prefixed with an apostrophe so the spreadsheet shows them as plain text.
From CSV to JSON
- First row is a header turns each line into an object keyed by the column names. Turn it off to get an array of arrays.
- Convert numbers and booleans makes
42a number andtruea boolean, and turns empty cells intonull. Turn it off to keep every value as a string, which preserves leading zeros in postal codes or phone numbers. - Rebuild nested objects from dotted headers reverses the flattening: the headers
address.cityandtags.0produce{"address": {"city": …}, "tags": [ … ]}. The round trip JSON → CSV → JSON therefore gives back the original structure for typical data.
If some rows have more or fewer fields than the header, the conversion still runs, but a warning shows the line of the first irregular row so that you can check it.
Frequently asked questions
Is my data uploaded anywhere?
No. The conversion runs entirely in your browser. Nothing you paste or open is sent to a server, so you can safely convert exports that contain customer or internal data.
Why does Excel show my CSV in a single column?
Excel uses your system’s list separator. In many European locales, including French, that separator is the semicolon. Choose Semicolon (;) as the delimiter before converting, or use Excel’s import wizard and choose the comma.
How are nested arrays of objects handled?
With flattening on, each element gets its own set of columns, for example orders.0.id and orders.1.id. This works well for short arrays. For long lists, it is often better to convert that array on its own so that each element becomes a row.
Why did my postal codes lose their leading zero?
When Convert numbers and booleans is on, 01234 is read as the number 1234. Turn the option off to keep every value exactly as written in the CSV.
What is the maximum size?
Files up to 10 MB can be opened. Larger pastes also work, but the browser slows down with very big text areas, so split huge files first.
Related tools
- JSON Formatter and Validator Free JSON formatter and validator that beautifies, minifies and checks JSON in your browser, with syntax errors reported by line and column.
- JSON to YAML Converter Convert JSON to YAML and YAML to JSON in your browser, with anchors, merge keys and multi-document files supported. Nothing is uploaded.
- JSON to XML Converter Convert JSON to XML and XML to JSON in your browser, with attributes, repeated elements and CDATA handled. Nothing is uploaded to a server.