TextSorter
JSON Input
CSV Output

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

  1. 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.
  2. 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.
  3. 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.
  4. 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.
  5. 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.

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

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

How do I convert JSON to CSV?
Paste your JSON, either a single object or an array of objects, into the input box and click "Convert to CSV." The tool flattens any nested objects into dot-notation columns, collects every unique key across all your records, and builds a CSV you can copy or download in well under a second.
Can this tool handle deeply nested JSON?
Yes, as long as "Flatten nested objects" stays checked. A structure like {"user":{"address":{"city":"Austin"}}} becomes a column named user.address.city, and the tool recurses through however many levels your data has, so a three or four level deep API response flattens just as cleanly as a shallow one.
What happens if my JSON objects have different keys?
The converter scans every object in your array first and builds the union of all keys it finds, not just the keys in the first record. Any record missing a particular key gets an empty cell in that column instead of a shifted or broken row, so your columns always line up correctly even with inconsistent records.
Is my JSON data safe when I use this tool?
Yes. Parsing and CSV generation both run as JavaScript inside your own browser tab, and nothing you paste is ever sent to a server, logged, or stored anywhere. That makes it safe to convert exported user records, CRM data, or anything else you would not want leaving your machine.
Why does my downloaded CSV look wrong when I open it in Excel?
Excel guesses both the delimiter and the text encoding when you double-click a .csv file, and on many systems it guesses a comma delimiter and a Windows codepage rather than UTF-8, which can turn accented names like "François" into garbled characters. Import through Excel's Data > From Text/CSV wizard instead, where you can explicitly set the encoding to UTF-8 and confirm the delimiter, and the text will come in correctly.
Should I use a comma or a semicolon as the delimiter?
Use a comma if your data and the person opening it are on an English-language locale, since that is the CSV default almost everywhere. Use a semicolon if the file is headed for a German, French, or other European-locale copy of Excel, because those regional settings already treat the comma as a decimal separator, so Excel expects semicolons to separate columns instead.
What happens to an array of objects, like a list of order line items?
When flattening is on, the tool expands each array of objects using index notation, so items[0].price and items[1].price become separate columns rather than one crowded cell. A plain array of strings or numbers, like a list of tags, is instead joined into a single semicolon-separated cell so you do not end up with a column for every possible tag.
Is there a maximum JSON file size this tool can handle?
There is no artificial limit built into the tool itself, since everything runs in your browser's own memory rather than through a rate-limited API. Very large arrays, tens of thousands of records, will convert in a few seconds on a normal laptop, though extremely large files are bounded by how much memory your browser tab has available.
Why do some cells in my CSV have quotation marks around them and others do not?
A field only gets wrapped in quotes when it actually needs it, meaning it contains the delimiter character itself, a literal quotation mark, or a line break. A simple value like "Alice" or "42" is left unquoted because there is nothing inside it that could be confused with the column separator or the end of a row.
Can I convert a single JSON object, not just an array?
Yes. If you paste a single object instead of an array, the tool automatically wraps it in a one-item array before processing, so you get back a CSV with one header row and one data row, using exactly the same flattening and quoting rules as a multi-record array.

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.