JSON to CSV Converter
Paste JSON and instantly convert it to CSV format. Handles nested objects, arrays, and large datasets. 100% client-side, your data never leaves your browser.
How to Convert JSON to CSV Online
JSON is what nearly every API returns, and it's a natural fit for code: objects nest inside objects, arrays hold more objects, and a program can walk that structure without much trouble. A spreadsheet doesn't work that way. Excel, Google Sheets, and every CSV import screen expect a flat grid of rows and columns, so the moment someone needs to hand JSON data to a marketer, an analyst, or a client who lives in Excel, somebody has to reshape it. That reshaping is exactly what this tool does, entirely in your browser, in the time it takes to paste and click a button.
The shape of the input matters less than people expect. You can paste a single JSON object, like the response from one API call, or an array of objects, like a list of database rows exported as JSON. Either way the converter normalizes what you gave it into a set of records, figures out every column header those records need between them, and writes out a proper CSV file with one header row followed by one row per record.
Step-by-Step Conversion Guide
- Paste your JSON. Drop a single object or an array of objects into the "JSON Input" box. It can come from an API response, a database export, a config file, or anywhere else JSON shows up.
- Pick a delimiter. Comma is the default and the right call for most English-locale spreadsheets, but the dropdown also offers Tab, Semicolon, and Pipe for the cases described below.
- Decide whether to flatten nested objects. Leave "Flatten nested objects" checked if your JSON has any hierarchy you want expanded into separate columns, such as an address object or a metadata block.
- Click "Convert to CSV." The tool parses your JSON, flattens it if requested, collects every unique column name across all records, and writes the result into the CSV Output box in a fraction of a second.
- Copy or download the result. Use the Copy button to grab the raw CSV text, or "Download .csv" to save it as a file you can open directly in Excel, Google Sheets, or LibreOffice Calc.
None of this touches a server. The parsing, the flattening, and the CSV formatting all run as JavaScript on your own device, so the conversion works the same whether your array has three records or thirty thousand, and nothing you paste is ever transmitted anywhere for processing.
Flattening Nested JSON: Dot Notation and Arrays Explained
A spreadsheet is fundamentally two-dimensional: rows and columns, nothing nested inside a cell. JSON has no such restriction, an object can contain another object, which can contain an array, which can contain more objects, as many levels deep as the data needs. Converting between the two formats means making a decision about every nested structure in your data, and this tool makes that decision using a small, predictable set of rules.
Nested objects get flattened using dot notation. Given {"user": {"profile": {"name": "Alice", "verified": true}}}, the tool walks into user, then into profile, and produces two columns named user.profile.name and user.profile.verified. It recurses through however many levels of nesting exist, so a deeply structured API response, four or five levels deep, still ends up as a flat row of columns rather than a wall of unreadable JSON text stuffed into a single cell.
Arrays split into two very different cases depending on what they contain. An array of plain values, like "tags": ["admin", "billing"], gets joined into a single cell as admin;billing rather than spread across multiple columns, since there's no natural column name for "the third tag" and most tag lists don't need to be searched or sorted column by column. An array of objects, on the other hand, like a list of order line items, gets expanded using index notation: items[0].sku, items[0].price, items[1].sku, items[1].price, and so on, so no data from any item in the array gets silently dropped or merged into a single unreadable string.
Mixed data is handled the same way regardless of how inconsistent it looks. Before writing a single row, the tool scans every object in your input and builds the full set of column names across the entire dataset, not just the keys found in the first record. If record five has a field that records one through four are missing, that field still gets its own column, and every row that doesn't have a value for it simply gets an empty cell rather than throwing off the alignment of the rest of the table.
Choosing a Delimiter: Comma, Semicolon, Tab, or Pipe
"CSV" stands for comma-separated values, but the comma is really just the default, and picking the wrong one is one of the most common reasons a converted file looks broken the moment someone opens it. This tool supports four delimiter choices, and each one solves a real, specific problem rather than existing for the sake of options.
| Delimiter | Best for | Why |
|---|---|---|
| Comma (,) | English-locale Excel, Google Sheets, most APIs | The universal CSV default; what nearly every tool expects unless told otherwise |
| Semicolon (;) | German, French, Spanish, and other European-locale Excel | Those regional settings use a comma as the decimal separator, so Excel there expects semicolons between columns instead |
| Tab (TSV) | Data with lots of commas already in the values | Tab characters almost never appear inside real-world text, so quoting is rarely needed |
| Pipe (|) | Legacy import tools and older data pipelines | Some older ETL and mainframe-adjacent systems standardized on pipe long before comma-vs-semicolon became a locale issue |
The comma-versus-semicolon split trips up more people than any other setting on this page, because it's invisible until the file is already open. If a colleague in Germany or France opens a comma-delimited CSV in their local copy of Excel, the spreadsheet often shows every single value crammed into column A, with no split at all, because Excel there is watching for semicolons and a comma looks like ordinary punctuation inside a value rather than a column boundary. Switching this tool's delimiter to semicolon before sending the file to a European colleague avoids that problem entirely, no configuration changes required on their end.
Quoting and Escaping: Commas, Quotes, and Line Breaks Inside a Field
Once you've picked a delimiter, the converter still has to handle values that contain that exact character, or a quotation mark, or an actual line break, without corrupting the row structure. A product description that says "Available in red, blue, and green" has commas in it that are not column separators, and a naive converter that just joins fields with commas would split that single description into three separate, broken columns.
This tool follows the standard CSV quoting rule: a field only gets wrapped in double quotes when it actually needs it, meaning it contains the delimiter character, a literal double quote, or a newline. Everything else is left as plain, unquoted text, which keeps the output easy to read and avoids cluttering simple values like names and numbers with quote marks they don't need.
- Embedded delimiter.
Doe, Johnbecomes"Doe, John"when the delimiter is a comma, so the comma inside the name is not mistaken for a column boundary. - Embedded quote marks. A value like
Say "hello"becomes"Say ""hello""": the whole field gets wrapped in quotes, and each internal quote mark is doubled up so a spreadsheet program can tell it apart from the quotes marking the edges of the field. - Embedded line breaks. A multi-line address stored as one JSON string, with an actual newline character in the middle of it, gets wrapped in quotes too. That lets the field legitimately span more than one line in the raw CSV text while every spreadsheet application still reads it back as a single cell rather than two separate rows.
This matters most for data pulled from free-text fields, things like customer feedback, product descriptions, or notes fields, where commas, quotation marks, and line breaks show up constantly and unpredictably. Getting the quoting right the first time is the difference between a CSV that opens cleanly and one where half the rows are shifted by a column because of one stray comma.
UTF-8, the Byte Order Mark, and Why Accented Names Turn to Garbage in Excel
A CSV file is just bytes; nothing inside the file format itself declares what text encoding those bytes represent. That ambiguity is invisible for plain English text using only the letters A through Z, but it becomes a real problem the moment a name, city, or product description contains an accented or non-Latin character, something like François, Müller, São Paulo, or Zürich. Saved and opened with mismatched assumptions about encoding, those characters come out as mangled sequences like François instead of the original text.
One common fix for this is a UTF-8 byte order mark, three specific bytes (EF BB BF) placed at the very start of a file, which tells a program that supports it "this file is UTF-8, read it that way" before a single character of actual data appears. Excel on Windows is one of the programs that looks for this marker: a UTF-8 CSV that starts with the BOM tends to open correctly when double-clicked, while the identical file without one is often read using the system's local codepage instead, silently corrupting any accented character in the file.
It's worth being direct about what this specific converter does: the download button in this tool writes a plain UTF-8 CSV file without prepending a byte order mark. For data that's entirely plain English text, that makes no visible difference at all. For data containing accented names or non-English city names, it means double-clicking the downloaded file in Excel can show mangled characters even though the underlying file is encoded correctly. The reliable fix, and one that works regardless of the BOM question, is to avoid double-clicking the file and instead use Excel's Data > From Text/CSV import wizard, which lets you explicitly tell Excel "this file is UTF-8" before it renders a single cell.
Opening the Result in Excel, Google Sheets, and LibreOffice Calc
The same CSV file behaves a little differently depending on which spreadsheet program opens it, mostly because each one makes different assumptions about delimiter and encoding by default.
Microsoft Excel
Double-clicking a .csv file hands it to Excel's fast-path opener, which guesses the delimiter from your Windows regional settings and guesses the encoding from your system codepage rather than checking for UTF-8. That's fast, but it's exactly the path that produces both the comma-versus-semicolon confusion and the accented-character mangling described above. The more reliable route is the Data > From Text/CSV wizard, sometimes called Get Data, which shows you a preview and lets you set the file origin to UTF-8 and confirm the delimiter before anything gets imported.
Google Sheets
Use File > Import > Upload and choose the CSV file. Google Sheets is noticeably better than Excel's default double-click behavior at detecting both UTF-8 encoding and the delimiter automatically, so a semicolon-delimited or comma-delimited file from this tool usually imports correctly without any manual configuration, though the import dialog still lets you override the separator if it guesses wrong.
LibreOffice Calc
LibreOffice shows a Text Import dialog every single time you open a .csv file, rather than only when you explicitly ask for it the way Excel does. That's slightly more friction for a quick look at a file, but it means you get full manual control every time: a character set dropdown where you can select "Unicode (UTF-8)" directly, and checkboxes for comma, semicolon, tab, and other separators so there's no ambiguity about how the file will be parsed.
Why This Converter Runs Entirely in Your Browser
Most "convert JSON to CSV" tools you'll find online upload whatever you paste to a server, process it there, and send the result back. That round trip is invisible during normal use, but it means your data, even briefly, sat on infrastructure you don't control. For a small snippet of public sample data that's a non-issue. For an export of real customer records, an internal database dump, or anything covered by a data processing agreement, it's a real concern, and it's the kind of thing a security review would flag immediately.
This converter never makes that round trip. Parsing the JSON, flattening nested objects, and building the CSV output are all plain JavaScript that ships with the page and runs on your device the moment you click Convert. Open your browser's network tab while you use it and you won't see a single request carrying your data anywhere. That has a practical side effect beyond privacy too: there's no server queue to wait behind and no API rate limit or upload size cap imposed by a backend, since your own computer does all the work.
What that means for teams handling sensitive exports
If you're converting a database export, a list of user records, contract line items, or anything else you wouldn't want leaving your organization, a purely client-side tool removes that risk from the equation entirely rather than asking you to trust a privacy policy you haven't read. It's the same reasoning that leads engineering teams to run a formatter or a data transform locally instead of pasting production data into a random web form.
Common Ways People Use This JSON to CSV Converter
Debugging and reviewing API responses
A developer pulls a JSON response from a REST endpoint and needs to hand a readable version to a QA tester or a product manager who lives in spreadsheets rather than a browser's dev tools. Converting the response here turns a wall of braces and brackets into rows and columns anyone on the team can scan and filter.
Exporting NoSQL query results
MongoDB, Firestore, and similar document databases return query results as JSON by default. Rather than writing a one-off export script, pasting a batch of query results into this tool produces a CSV that opens directly in Excel or Sheets for ad hoc analysis, filtering, or a quick pivot table.
Preparing product feeds and catalog data
Online marketplaces and marketing platforms frequently require CSV for bulk product uploads, while the product data itself often lives in a JSON feed or API. Converting a JSON export of a product catalog, including nested fields like pricing tiers or variant attributes, saves hand-building a spreadsheet from scratch.
Log analysis and structured log lines
Applications that emit structured JSON logs produce data that's easy for machines to parse but tedious to scan visually. Pasting a batch of log entries into this tool and flattening them into columns makes it far easier to sort by timestamp, filter by status code, or spot a pattern across hundreds of entries.
Data migration between systems
Moving data from one platform to another often means the source system exports JSON while the destination system only accepts CSV imports. Converting the export here, checking the column headers the flattening produced, and adjusting field names as needed is usually faster than writing a throwaway script for a one-time migration.
Tips for Clean CSV Output and Common Pitfalls
- Watch for column explosion with long arrays of objects. If one record has an array of fifty line items and another has three, flattening produces up to fifty sets of
items[N].fieldcolumns, most of them empty for the shorter records. When arrays vary a lot in length across your dataset, consider unchecking "Flatten nested objects" so each array stays as a single JSON string in one cell instead. - Numbers that need to stay text. A ZIP code, phone number, or ID stored as a JSON string, like
"00501", comes through the CSV as text and keeps its leading zero. If Excel later reformats that column as a number and drops the leading zero on its own, set the column's format to Text before or during import rather than after. - Null and missing values become blank cells, not the word "null." That keeps the CSV clean for filtering and sorting, but it also means you can't visually distinguish "explicitly set to null" from "key was missing entirely" once the data is in spreadsheet form; if that distinction matters, check the source JSON before converting.
- Re-check the delimiter after pasting a new dataset. The dropdown stays on whatever you last selected, so if you converted a semicolon-delimited file for a colleague and then paste in a new dataset, it's worth confirming the delimiter still matches who or what will be opening the next file.
- Very large arrays are still fine, just watch your browser tab. There's no hard limit built into the tool, but a JSON array with tens of thousands of deeply nested records will use noticeably more memory than a small one; if the tab starts to feel sluggish, converting the data in smaller batches works just as well.
Most CSV output that looks wrong traces back to one of these five things rather than a bug in the conversion logic itself: an inconsistent array length, a number that should have stayed text, a missing delimiter match on the receiving end, or an encoding mismatch when the file is opened. Checking the CSV Output box before downloading, especially the header row, is the fastest way to catch any of them early.
Frequently Asked Questions
Related data conversion tools
🔒 100% Client-Side Privacy
All JSON parsing and CSV generation happens <strong>entirely in your browser</strong>. No data is ever uploaded to any server. Your JSON stays on your device at all times.