JSONToonPro
JSON converter tool

JSON to CSV Converter Online

Convert JSON arrays and nested JSON objects to CSV format in one click, or go the other way with built-in CSV to JSON support. Flatten nested JSON, choose your delimiter, and download a ready to use file. Everything runs in your browser, so your data stays private.

100% client sideBidirectional swapCopy and download
Delimiter
3 × 7
Input· JSON
607 chars35 lines
Output· CSV
228 chars4 lines

How Nested JSON Becomes Flat Columns

CSV is a rectangle. Every row has the same number of fields and every field holds a single scalar value. JSON is a tree, so something has to give when you convert one into the other. The standard answer is dot notation: a nested key path is collapsed into one column name by joining the levels with a full stop.

An object like {"id": 7, "address": {"city": "Leeds", "postcode": "LS1 4DY"}} produces three columns: id, address.city, and address.postcode. Nesting can go as deep as you like, and the column name simply grows longer. The rule is reversible, which is what makes a lossless round trip back to JSON possible: split each header on the full stop and rebuild the branches.

Records that do not share the same shape are handled by taking the union of all key paths across the array. A record that lacks a particular path gets an empty cell rather than being skipped, so the rectangle stays intact.

What happens to arrays inside a record

Arrays have two reasonable treatments. The first is joining the elements into one cell with a separator such as a pipe, so ["vip", "beta"] becomes vip|beta. This keeps the column count stable no matter how many elements each record has, and it survives a round trip if you pick a separator that never appears in the data. The second is indexed expansion, where tags[0], tags[1], and tags[2] become their own columns. That preserves element identity but the column count is set by the longest array in the whole file, which produces a lot of empty cells.

Arrays of objects are the hard case. An orders array containing three objects with four keys each turns into twelve columns under indexed expansion. When that happens, it is usually a sign the data wants two CSV files with a shared key rather than one wide file.

Side by Side Example

The same three user records, first as a JSON array and then as the CSV the converter produces with flattening enabled.

JSON input

[
{ "id": 1, "name": "Ada Lovelace",
"address": { "city": "London" },
"tags": ["admin", "beta"] },
{ "id": 2, "name": "Grace Hopper",
"address": { "city": "New York" },
"tags": ["admin"] },
{ "id": 3, "name": "Alan Turing, Jr",
"address": { "city": "Wilmslow" },
"tags": [] }
]

CSV output

id,name,address.city,tags
1,Ada Lovelace,London,admin|beta
2,Grace Hopper,New York,admin
3,"Alan Turing, Jr",Wilmslow,

Note row three. The name contains a comma, so the whole field is wrapped in double quotes. The empty array becomes an empty trailing field rather than the text [].

RFC 4180 Quoting Rules

CSV has no single official standard, but RFC 4180 is the closest thing to one and it is what every serious parser expects. Three rules matter.

  1. A field containing the delimiter, a double quote, or a line break must be enclosed in double quotes.
  2. A double quote inside a quoted field is escaped by doubling it. The value She said "hi" is written as "She said ""hi""".
  3. Line endings inside quoted fields are legal. A parser that splits the file on newlines before parsing quotes will corrupt this data, which is why naive split based parsers fail on real exports.

Fields that need no quoting may still be quoted. Quoting everything is valid and slightly larger, and some teams prefer it because the output is uniform.

Choosing a Delimiter

DelimiterWhen to use itWatch out for
CommaThe default, expected by most tools and APIsVery common inside free text fields, so quoting kicks in often
SemicolonEuropean locales where the comma is the decimal separatorExcel picks this based on system locale, not on the file
TabTSV files, database bulk loaders, quick shell processingTabs pasted inside a field are invisible and break rows silently
PipeLog style exports and legacy ETL pipelinesNot recognised automatically by spreadsheet import dialogs

If a German or French colleague opens your comma separated file and sees everything crammed into column A, the delimiter is the reason. Their Excel is looking for semicolons. Re-export with a semicolon delimiter rather than asking them to change their regional settings.

Excel Gotchas That Silently Corrupt Data

CSV is plain text with no type information, so Excel guesses. Its guesses are frequently wrong and it does not warn you.

Value in CSVWhat Excel showsWhy
00745745Leading zeros are stripped because it is read as a number
40123456789012344.01235E+15More than 15 significant digits, converted to scientific notation
1-202-JanInterpreted as a date in the current locale
3/404-MarInterpreted as a date, not a fraction
SEPT11-SepThe famous gene name problem, still active in many builds
+44 20 7946Formula errorA leading plus sign starts a formula

The fix is never to double click the file. Use Data then From Text/CSV, and in the import preview set the type of every identifier column to Text before loading. That instructs Excel to leave the characters alone. If you only need the file read back by a program rather than a human, this problem does not exist at all.

Common Pitfalls and Fixes

ProblemCauseFix
Rows shift left after a certain lineAn unquoted delimiter inside a fieldEnable proper quoting on export, or switch to tab delimited
Accented characters render as é or similarFile read as Latin-1 rather than UTF-8Save as UTF-8 and add a byte order mark if Excel is the consumer
Columns differ between two exportsSparse records and key order taken from the first object onlyTake the union of keys across all records
One giant unreadable columnNested arrays of objects expanded by indexSplit into a parent file and a child file joined on the id
Trailing empty row on importA final newline at end of fileHarmless, most parsers ignore it, configure skip empty lines

Working across formats? The same dataset can be pushed further with the full converter collection, including CSV to JSON for the return trip, JSON to Excel when you need real typed cells rather than plain text, and JSON to SQL when the destination is a database table.

How to convert JSON to CSV online

Three steps, zero setup
01

Paste or upload your JSON

Drop a JSON array, object, or upload a .json file into the input panel. Click Sparkles to load a realistic sample to test with.

02

Pick your delimiter and options

Choose comma, semicolon, tab, or pipe. Toggle the header row and flatten nested JSON to match exactly how your spreadsheet or database expects it.

03

Copy or download the result

Conversion happens live as you type. Click Copy for quick paste, or Download to save a ready to import .csv file for Excel, Google Sheets, or SQL.

Built for developers who ship

Every detail engineered for fast, correct, private JSON and CSV conversion. No uploads, no server conversion, no compromises.

100% client side

Your JSON never leaves the browser. No uploads, no servers, no tracking.

Instant conversion

Live output as you type. Handles thousands of rows in milliseconds.

RFC 4180 compliant

Proper escaping, quoting, and type detection for safe round-trips.

Nested JSON ready

Flattens with dot notation or unflattens CSV back into nested objects.

Bidirectional swap

Convert JSON to CSV or CSV to JSON with one click. Round-trip lossless.

Export workflow

Copy CSV or download a ready to import file for spreadsheets and databases.

Frequently asked questions

12 answers
Paste your JSON array or upload a .json file into the input panel. Pick your delimiter (comma, semicolon, tab, or pipe), toggle the header row or flatten nesting if needed, and the CSV output is generated instantly in the right panel. Click Copy or Download to save the result.

CSV to JSON Converter

Need to go the other direction? The same tool works as a CSV to JSON converter. Click the CSV to JSON tab or use the Swap button to reverse the conversion. Paste any CSV with a header row and get clean JSON output instantly. The converter auto-detects data types so numbers stay numbers, booleans stay booleans, and empty cells become null.

More JSON Tools