Free JSON to CSV Converter
Convert JSON arrays of objects to CSV or TSV format.
How to Use
1. Paste a JSON array of objects (or a single object) into the input area.
2. Choose your delimiter · comma for CSV, tab for TSV, or other formats.
3. Click Convert to generate the CSV output.
4. Copy to clipboard or download as a file.
Nested objects and arrays are serialized as JSON strings in the CSV output. All processing happens client-side · your data never leaves your browser.
Why JSON-to-CSV Conversion Is Such a Common Workflow
JSON is the dominant payload format for modern web APIs; CSV is the lowest-common-denominator format for tabular data. Excel, Google Sheets, SQL LOAD DATA, R, Pandas, Tableau, Power BI, and almost every ETL pipeline can ingest CSV out of the box. So when API output needs to land in a spreadsheet for a stakeholder, or in a database for analysis, somebody has to flatten the JSON into rows. This tool does that flattening in your browser, with no server roundtrip and no upload of potentially sensitive data.
The CSV Format (RFC 4180)
There is no single formal CSV standard, but RFC 4180 (October 2005, "Common Format and MIME Type for Comma-Separated Values (CSV) Files") is the closest thing the industry has to a canonical reference. The rules everyone agrees on:
- One record per line, separated by line breaks. The RFC specifies CRLF; most modern parsers accept LF too.
- Fields within a record are separated by a single delimiter character, a comma in the canonical form, but a semicolon, tab, or pipe is common in regional and legacy variants.
- Every record should have the same number of fields. Missing values become empty cells; extra delimiters are an error.
- Header row is optional; if present, it's the first line.
- Fields containing commas, line breaks, or double quotes must be enclosed in double quotes.
- Embedded double quotes inside a quoted field are escaped by doubling:
"She said ""hello""". - The MIME type registered for CSV is
text/csv.
Why Four Delimiters Instead of One
The default is comma, but each delimiter solves a specific problem:
- Comma (
,), the standard in the US, UK, and other English-speaking locales. Excel reads CSV with commas when the OS regional setting is English. Default forapplication/csvin the wider tooling ecosystem. - Semicolon (
;), the de facto default in continental Europe, Latin America, and other regions where the comma is the decimal separator. Excel uses the OS list separator, so a French- or German-locale Excel produces semicolon-delimited CSV. - Tab, TSV (tab-separated values) is common in scientific data, bioinformatics, and any context where the data itself contains commas (free-text fields, addresses).
- Pipe (
|), favoured in some legacy enterprise systems where the data may contain commas, semicolons, AND tabs. Rarely the right first choice but useful when nothing else works.
Flattening Nested JSON: Three Strategies
JSON is hierarchical; CSV is flat. There is no general-purpose lossless mapping between the two. When the input contains nested objects or arrays, every converter has to make a choice:
- Inline as JSON string. The nested portion is serialised back to JSON and dropped into a single CSV cell. This tool's default approach. Lossless; round-trip-safe; the consumer needs to parse the inner JSON if they want the structure.
- Dotted-key flattening.
{address: {street, city}}becomes columnsaddress.streetandaddress.city. Pandas'sjson_normalizeworks this way. Cleaner for analysts but the column count explodes for deeply-nested data. - Row explosion. An array becomes multiple rows, with parent fields repeated.
{name: "Alice", tags: ["a", "b"]}becomes two rows, both withname=Alice. Best for one-to-many relationships; loses the "one record per row" mental model.
If you need dotted-key or row-exploded output, pre-process the JSON before pasting it in, either via a small Python / Node script or Pandas's json_normalize.
Headers, Type Round-Tripping, and Excel's Auto-Format Trap
JSON has a real type system (number, string, boolean, null, array, object); CSV has only strings. The convention is for the consumer to infer types from context. The tool generates header rows from the union of all keys across all input objects, leaves missing fields as empty cells, writes booleans as true/false, and writes JSON null as an empty cell.
Excel is helpful in ways that occasionally hurt:
- Leading-zero stripping. A column of postal codes like
01234opens as the number1234. Workaround: prefix with an apostrophe ('01234) inside the CSV, or use Excel's import wizard and explicitly set the column type to Text. - Auto-date conversion. Strings that look like dates (
3/4/5,Mar-23) are silently converted. Same workarounds. - Scientific notation. Long numeric IDs (credit card numbers, large integers) get converted to
1.23E+15and lose precision. JSON can preserve numbers up to 253−1 exactly; for anything larger, transmit the value as a string in JSON. - UTF-8 BOM mismatch. Excel on Windows defaults to Windows-1252; opening a UTF-8 CSV without a BOM corrupts non-ASCII characters (é, ü, å become mojibake). Adding a UTF-8 BOM (
) at the start of the file fixes this. Google Sheets handles UTF-8 without a BOM correctly, so the BOM is platform-specific.
CSV Injection, A Security Note Worth Knowing
If a CSV is going to be opened in Excel or Google Sheets, a cell that begins with =, +, -, or @ is interpreted as a formula. OWASP's CSV Injection page documents the attack class, a malicious string like =cmd|' /c calc'!A0 in a user-submitted field can execute commands when an admin opens the export. Defensive practice: prefix any cell starting with one of those four characters with a single quote, or wrap it in quotes plus a leading apostrophe. Important to know if you're exporting user-generated content.
Common Edge Cases the Converter Handles
- Field containing the delimiter, quoted automatically.
San Francisco, CAin a comma-CSV becomes"San Francisco, CA". - Field containing a literal newline, quoted; multi-line content is legal inside quotes per RFC 4180.
- Field containing a double quote, quoted, with the inner quote doubled:
She said "yes"becomes"She said ""yes""". - Empty arrays and objects, serialised as
[]and{}respectively in their cells. - Records with different keys, the union of all keys forms the header row; missing fields are empty cells.
- Single object vs array, a single JSON object becomes a single-row CSV.
When to Use This Tool
- Exporting API responses for stakeholders who want a spreadsheet they can sort and filter.
- Bulk-importing JSON data into a SQL database via
LOAD DATA INFILE(MySQL) orCOPY(PostgreSQL). Both expect CSV-shaped input. - Quick data analysis in Excel, Google Sheets, Pandas, R, Tableau, or Power BI.
- Generating mailing lists from a JSON API response of contacts.
- Migrating data between systems that don't share an API but both speak CSV.
- Reviewing a JSON file by eye when it's too repetitive to read directly, the spreadsheet view is often easier.
Privacy
CSV exports almost always contain PII, customer records, employee data, transaction logs, contact lists. Server-side conversion sends every record through a third party's infrastructure, where it lives in transit logs, server logs, and possibly cached responses. Browser-based conversion keeps the data on your machine. The entire flatten-and-quote step here happens in JavaScript inside your browser; nothing is uploaded.
Common Mistakes
- Wrong delimiter for the audience. Sending a comma-CSV to a French Excel user produces a single-column file. Match the delimiter to the recipient's locale.
- Pasting a single object instead of an array. A single object converts to a one-row CSV with column headers from the keys. For multiple records, wrap them in an array.
- Expecting Pandas-style flattening. Nested objects in this tool serialise as JSON strings inside cells. If you need
address.streetcolumns, flatten first. - Using CSV for very large numbers. JSON safely represents integers up to 253−1 (about 9 quadrillion). Past that, transmit as a string. Excel will mangle long numeric IDs even when CSV preserves them.
- Opening in Excel without thinking about encoding. Non-ASCII characters need the UTF-8 BOM for Excel on Windows; Google Sheets and modern Excel for the web don't need it.
- Exporting user-generated text without sanitising formula prefixes. Cells starting with
=,+,-, or@are formulas in Excel and Sheets. CSV injection is a real attack against admins who open exported files.
Frequently Asked Questions
My JSON has nested objects. How are they handled?
Each nested object or array is serialised as a JSON string inside its CSV cell. So {user: {name: "Alice", role: "admin"}} becomes one column called user containing {"name":"Alice","role":"admin"}. This round-trips losslessly. If you need separate user.name and user.role columns, pre-process with Pandas's json_normalize or a small flatten script.
Why do my non-English characters look broken in Excel?
Excel on Windows opens CSV in Windows-1252 by default. UTF-8 CSV without a Byte Order Mark looks like mojibake (é → é). The fix: either save the file with a UTF-8 BOM, use Excel's Data → From Text import wizard and explicitly select UTF-8, or open the file in Google Sheets, which handles UTF-8 without a BOM correctly.
Does the tool handle commas inside fields?
Yes. Per RFC 4180, fields containing the delimiter, line breaks, or double quotes are automatically enclosed in double quotes. Embedded double quotes are escaped by doubling them. So San Francisco, CA becomes "San Francisco, CA" and She said "hi" becomes "She said ""hi""".
Is my JSON sent to a server?
No. Conversion runs entirely in your browser. The textarea contents are not transmitted, logged, or stored anywhere. This matters because exported records often contain PII, customer data, employee info, transaction histories, that you don't want flowing through someone else's infrastructure.
Can I get tab-separated output (TSV)?
Yes, pick "Tab" in the delimiter dropdown. TSV is the right choice when your data contains commas (addresses, free-text fields, financial data with thousands separators) and you don't want to wrap every other cell in quotes. Many bioinformatics and scientific-data formats are TSV by default.
What's the size limit?
Whatever your browser can hold. There's no server-side limit because there's no server involved. Tens of megabytes of JSON convert in a second or two on a modern device; hundred-megabyte payloads start to slow down. For very large datasets, batch them or move to a streaming converter at the command line.
Related Tools
CSV to JSON Converter
Convert CSV data to JSON arrays or objects with customizable delimiters.
JSON Formatter & Validator
Format, minify, and validate JSON instantly. Configurable indentation and error messages.
JSON Schema Generator
Generate a JSON Schema from any JSON object. Supports nested objects, arrays, and all types.