CSV to JSON
Paste or drop a file. Nested JSON is flattened into columns.
How to convert CSV and JSON
Pick a direction
Use the CSV to JSON or JSON to CSV tab above. Paste into the left pane, press Open, or drop a .csv, .tsv or .json file onto it. Sample loads a worked example.
Set the options
For CSV input, leave Delimiter on Auto, pick a shape (array of objects, array of arrays or one object of columns) and say whether the first row is a header. For JSON input, pick the delimiter and whether to write a header row.
Check and export
The table under the result previews the first 20 rows and the status line shows the row and column count. Press Copy, use Ctrl+C with nothing selected, or Download data.json or data.csv.
Good to know
- Auto-detect looks at the first 20 lines and picks the delimiter (comma, semicolon, tab or pipe) that splits them most evenly. Choose one by hand if a file has many commas inside quoted text.
- Quoted fields follow the CSV standard: commas, line breaks and doubled quotes inside quotes are handled. Blank lines are skipped and Trim cells removes spaces around values.
- With Numbers and booleans on, 42 becomes a number, true and false become booleans and empty cells become null. Values with a leading zero or more than 15 digits always stay strings.
- JSON to CSV flattens nested objects into dot-separated columns (address.city), joins arrays of plain values with commas and numbers arrays of objects (tags.0.name). The JSON must be strict; the JSON formatter can repair trailing commas and comments first.
- Files over 2 MB are converted in a background worker without loading them into the editor. The screen shows the first 1 MB of the result; Download always has all of it, and Copy is disabled above 20 MB.
- Nothing is uploaded. Parsing and conversion run in your browser.
Questions people ask
My CSV uses semicolons. Will it work?
Yes. Auto detects semicolons, tabs and pipes as well as commas, and the status line tells you which one it found. You can also pick the delimiter yourself.
Why are some numbers turned into text, or text into numbers?
With Numbers and booleans on, anything that looks like a plain number becomes one, except values with a leading zero or more than 15 digits, which stay as strings. Untick the option to keep every cell as a string.
How is nested JSON turned into CSV columns?
Nested objects become dot-separated column names such as address.city. Arrays of simple values are joined with commas in one cell, and arrays of objects get numbered columns like tags.0.name. The columns are every key seen across all rows, in the order they first appear.
Which shape should I choose for CSV to JSON?
Array of objects is the usual choice for APIs and code. Array of arrays is smaller and keeps the row structure. Object of columns gives one array per column, handy for charts.
Is my file uploaded?
No. Parsing and conversion run in a web worker inside your browser. Files never leave your device.