JSON ↔ CSV Converter
Convert JSON to CSV and CSV back to JSON right in your browser. Paste an array of objects for a spreadsheet-ready table, or paste CSV to get structured JSON — with full control over the delimiter and header row.
Delimiter
Enter data above to see the converted result here.
How to use JSON to CSV Converter
- 1
Choose a direction
Use the toggle to pick JSON to CSV or CSV to JSON. The swap button moves your result into the input so you can convert back the other way.
- 2
Paste your data
Paste a JSON array of objects, or CSV text, into the input box. The conversion runs automatically as you type.
- 3
Set the options
Pick the delimiter that matches your data, and when reading CSV decide whether the first row is a header and whether to parse numbers and booleans.
- 4
Copy the result
Review the converted output and copy it to your clipboard, ready to drop into a spreadsheet, a database, or your code.
Turning JSON Arrays into Spreadsheet-Ready CSV
The core mapping: objects become rows, keys become columns
CSV is a flat, two-dimensional grid — rows and columns — while JSON is a tree. The conversion that makes sense is therefore a specific one: a top-level array of objects, where each object is one record. Every object becomes a single data row, and the union of all the keys across every object becomes the header row. Paste an array of three person records with name and role fields, and you get a header line of name and role followed by three rows.
Collecting keys across all objects, not just the first one, is what keeps ragged data aligned. If your first record has a name and an email but the second adds a phone field, the converter still emits a phone column and simply leaves the first row's phone cell empty. Order is taken from first appearance, so the columns read in a predictable, stable sequence.
Why an array of objects is the right input shape
A single number or an array of bare strings has no natural tabular form, so the array-of-objects convention exists to remove that ambiguity. Each element becomes a row; each field name becomes a column. A lone object is simply the one-row case — this tool wraps a single object into a one-row table whose header is its keys — but the convention really shines for lists, which is exactly the shape most REST endpoints return for list resources: a users endpoint, an orders endpoint, a search-results endpoint. That is why exporting an API response to a spreadsheet is the most common reason people reach for this conversion.
If your real data is wrapped one level deep, for example an object whose results field holds the array you care about, lift that inner array out first and paste it on its own. Feeding the converter the array directly is what produces a clean table rather than a single confusing row.
How nested objects and arrays are handled
CSV has no concept of depth, so a value that is itself an object or an array cannot expand into more columns without inventing a flattening scheme. This tool takes the predictable, reversible route: a nested value is serialized as compact JSON text inside a single cell. An address field holding a street and a city becomes one cell containing that small object as a JSON string, quoted so its internal commas do not break the row.
That keeps the data intact and round-trippable, but it is not pleasant to read in a spreadsheet. When your records are genuinely hierarchical — deeply nested config, tree structures, anything with arrays of arrays — CSV is the wrong target and a JSON or YAML representation will serve you far better. CSV shines for flat, record-like data.
Quoting and escaping, the part that silently corrupts files
The reason naive string-joining produces broken CSV is that the delimiter can appear inside the data. A city value of "Portland, Oregon" contains a comma; written raw, it would split into two cells and shift every column after it. The converter follows the common RFC 4180 convention: any field that contains the delimiter, a double quote, or a line break is wrapped in double quotes, and any double quote already inside the value is doubled.
So a value containing the word she said "hi" is emitted with surrounding quotes and the inner quotes doubled, and a value with an embedded newline is wrapped so the line break stays inside one cell rather than starting a new row. This is precisely the encoding spreadsheets expect on import, which is why a correctly quoted file opens cleanly while a hand-rolled one scatters data across the grid.
Choosing the delimiter
Comma is the default and the C in CSV, but it is a poor fit when your data is full of commas or when your spreadsheet locale uses the comma as a decimal separator. For that reason much of Europe defaults to the semicolon, and analysts often prefer the tab character because tabs almost never appear inside real field values, sidestepping most quoting entirely.
Match the delimiter to where the file is going. If a colleague's spreadsheet keeps cramming every row into column A, the usual cause is a delimiter mismatch — switch between comma, semicolon, and tab until the columns split correctly on their machine.
Round-tripping back to JSON
The conversion runs both directions. Swap to CSV-to-JSON and the header row names the keys while each following row becomes an object, which is handy when a non-developer hands you a spreadsheet and you need structured data for an API or an import script. One caveat defines the round trip: CSV cells are untyped text, so a 42 read back from CSV is the string 42, not the number, unless you enable typed parsing.
Enable the parse-numbers-and-booleans option to convert plain numeric and true/false text into real JSON values on the way back. Even then, treat the round trip as lossy in spirit — quoting normalizes, type information is reconstructed by heuristic, and any nested-JSON-in-a-cell has to be parsed again by hand. For a faithful copy of structured data, keep it in JSON the whole way.
Where this fits in a real workflow
The everyday use is bridging engineering and the rest of the business: export an API list to CSV so it opens in a spreadsheet, drops into a BI dashboard, or feeds a bulk-import template. Analysts get a grid they can pivot and chart; you skip writing a one-off export script. Because the whole conversion happens in your browser, you can do this with production data — order histories, user lists, internal metrics — without sending any of it to a third-party server.
A practical tip for clean exports: normalize your records before converting. Make sure every object uses the same field names, hoist the array out of any wrapper object, and decide up front whether nested fields should be flattened in your code or left as JSON-in-a-cell. A few minutes of shaping the JSON yields a CSV that needs no cleanup after import.
Frequently asked questions
How do I convert JSON to CSV?
What CSV format does the converter use?
Can it convert CSV back into JSON?
How are nested objects handled?
Is my data uploaded to a server?
Related tools
Keep going with these handy tools