CalcOak

JSON to CSV Converter: turn JSON arrays into spreadsheet-ready CSV and back again

JSON → CSV options
CSV → JSON options

How to use this converter

Paste your data into the left box, or click "Open file" to load a .json or .csv from disk. The tool looks at the first character to decide which way to convert: text starting with [ or { is treated as JSON, anything else as CSV. If it guesses wrong, set the direction menu yourself. The result appears on the right as you type, along with a count of rows and columns, and any JSON syntax error is reported with the line and column where parsing stopped, which is far quicker than hunting for a missing comma in a 2,000-line export.

Going from JSON to CSV, nested objects are flattened so order.customer.email becomes a single column, and you choose whether arrays are joined into one cell or split into numbered columns. Pick a semicolon delimiter and tick the BOM box if the file is destined for Excel in a European locale. Going the other way, the parser follows RFC 4180, so quoted cells containing commas, doubled quotes or line breaks are handled correctly, and the delimiter is detected from the header row. Turn on "unflatten" to rebuild nested objects from dotted headers, and use Swap to feed the output straight back in as a round-trip check.

Why use this rather than a spreadsheet or a script

Spreadsheets are poor at JSON: Excel's Power Query can import it, but arrays of objects end up needing several expansion steps, and dates and long numeric IDs get silently reformatted on the way out. Writing a quick Python or Node script works, but you still have to remember the quoting rules, decide how to flatten nesting and handle the record that has three extra keys the others lack. This page does that work with sensible defaults, and its header is the union of every key it sees, so uneven records do not lose data.

It is also useful for the reverse trip. Support teams often receive CSV exports from a CRM or a payment provider and need them as JSON for an API call or a test fixture; with type inference on, prices become numbers and flags become booleans instead of strings. Everything runs locally in the browser, so a file containing customer email addresses never leaves your machine, and inputs of several megabytes convert in well under a second.

Frequently asked questions

How are nested objects turned into CSV columns?+

Each nested key becomes its own column, with the path joined by dots. A record like {"address": {"city": "Oslo"}} produces a column called address.city. Arrays are either joined into one cell with "; " between the items, or expanded into numbered columns such as tags.0 and tags.1, depending on the option you pick. The header is the union of every key seen across all records, in the order they first appear.

Can it convert CSV back into nested JSON?+

Yes. With "unflatten dotted headers" switched on, a column called address.city is rebuilt into an address object containing a city property, and numbered columns like tags.0, tags.1 become a real array. This means a file exported by this tool can be converted back to JSON with the same structure it started with.

Why does Excel show odd characters or put everything in one column?+

Two common causes. Excel on many European locales expects a semicolon rather than a comma, so pick the semicolon delimiter for those installs. Non-ASCII text such as accented letters or Chinese characters can display as garbage unless the file starts with a byte-order mark, which is what the "add BOM for Excel" option writes. Both are harmless for other spreadsheet and database tools.

What does type inference do when converting CSV to JSON?+

CSV has no notion of numbers or booleans, so every cell is text. With inference on, cells that look like numbers become JSON numbers, true and false become booleans and the word null becomes null. Values with leading zeros such as 007 or very long digit strings stay as text so postcodes and IDs are not damaged. Turn inference off to keep everything as strings.

Is my data uploaded anywhere?+

No. Parsing and conversion happen entirely in your browser with JavaScript; nothing is sent to a server, and the page keeps working offline once loaded. Files you open with the file picker are read locally, and the Download button builds the output file in memory. That makes it safe to use with customer exports or internal reports.