Your files never leave your device. All processing happens locally in your browser.
How do I convert JSON to CSV in the browser without uploading the file?
Open the JSON to CSV Converter, then paste your JSON, drop in a .json / .txt / .ndjson file, or fetch a CORS-enabled URL — and it converts to CSV live as you type, entirely in your browser. It accepts a JSON array of objects (the usual API response), a single object, an array of arrays (the first row treated as the header), an array of primitives, or an NDJSON / JSONL stream with one object per line. Nested objects are flattened into dot-notation columns by default — a record like {“name”:“Alice”,“address”:{“city”:“NYC”}} becomes the columns name and address.city — and the header is the union of every key seen across all records, so objects with different fields still line up with empty cells where a value is missing. Arrays and any objects you choose not to flatten are written as a JSON string inside the cell. Every field is escaped to the RFC 4180 standard, so a value containing the delimiter, a double-quote or a newline is wrapped in quotes with internal quotes doubled. You can pick the delimiter (comma, tab, semicolon or pipe), toggle the header row and nested flattening, choose LF or CRLF line endings, add a UTF-8 BOM so Excel opens accented text correctly, set how null appears, write booleans as 1 / 0, quote every field, and include, exclude or reorder columns. A live text or table preview (first 100 rows) shows the result, and you can download .csv (or .tsv for a tab delimiter), export a real .xlsx workbook, or copy to the clipboard. Everything runs on your device — the file is never uploaded, so private or sensitive data stays on your machine (inputs up to 50 MB).
Accepts a JSON array of objects, a single object, an array of arrays, an array of primitives, or NDJSON / JSONL — live as you type
Flattens nested objects into dot-notation columns (address.city); the header is the union of all keys, with empty cells for missing fields
RFC 4180 escaping (quotes any field with the delimiter, a “” quote or a newline) with a choice of comma, tab, semicolon or pipe delimiter
Excel-friendly options: UTF-8 BOM, LF / CRLF endings, quote-every-field, null placeholder, booleans as 1 / 0, and column include / exclude / reorder
Download .csv / .tsv, export a real .xlsx workbook, or copy — 100% client-side, inputs up to 50 MB
What is
JSON to CSV Converter
A JSON to CSV converter transforms JSON — the nested, hierarchical format used by web APIs, config files and JavaScript — into CSV, the flat row-and-column format that spreadsheets, databases and BI tools import. The usual input is an array of objects, where each object becomes a row and each key becomes a column; other accepted shapes include a single object (one row), an array of arrays (the first row taken as the header), an array of primitives (a single column) and NDJSON / JSONL (one JSON value per line, common for logs and streaming). The central problem is that CSV has no nesting, so a converter must decide what to do with nested objects and arrays: the common approach is to flatten nested objects into dot-notation columns such as address.city, and to serialise arrays (and any un-flattened objects) as a JSON string inside a single cell. Because JSON records are often heterogeneous — one object has a field the next lacks — the converter collects column names across every record, typically in first-seen order, and leaves an empty cell wherever a record is missing a column. Correct output also requires RFC 4180 escaping: any field that contains the delimiter, a double-quote or a line break is wrapped in double-quotes, and a literal quote is written as two quotes (“”). This converter is 100% client-side: it parses, flattens and serialises in your browser with no upload, exports to CSV, TSV or a real .xlsx workbook via a bundled engine, and lets you choose the delimiter, line endings, a UTF-8 BOM, null representation and which columns to include. Its honest limits: arrays are stringified rather than exploded into extra rows, very large inputs are bounded by browser memory (a 50 MB cap), and fetching a remote URL only works when that server sends permissive CORS headers.
File Tools
Related terms
JSONCSVRFC 4180delimiterNDJSONJSON Linesflattendot notationnested objectsTSVExcelxlsxBOMUTF-8CSV to JSON
Frequently Asked Questions
No. The JSON is parsed and converted entirely in your browser — there is no upload, server or account, so your data never leaves your device.
Nothing is uploaded. When you paste text or open a file the converter reads it locally with the browser’s File API, parses it into memory, flattens and serialises it to CSV on your device in JavaScript, and builds any .xlsx export locally too. There is no server, API, database or tracking in the processing path, so an API dump, customer export or any other sensitive data stays on your machine. The tool works offline once cached, and closing the tab discards everything. The one case where data touches the network is if you paste a remote URL for the tool to fetch — and even then the response is downloaded straight into your browser and never sent anywhere else. The only optional network use anywhere on the site is consent-gated advertising, which never sees your file.
Nested objects are flattened into dot-notation columns like address.city, while arrays (and any un-flattened objects) are written as a JSON string inside the cell.
CSV is flat, so the converter has to project JSON’s nesting onto columns. With flattening on (the default), a nested object is walked recursively and each leaf becomes its own column named by the dot path — {“address”:{“city”:“NYC”,“zip”:“10001”}} produces address.city and address.zip. Turn flattening off and each nested object is instead written whole as a JSON string in one cell. Arrays are always serialised as a JSON string (for example tags becomes [“admin”,“user”]) rather than being exploded into extra rows, which keeps one input record on one output row. The header is the union of every key across all records in first-seen order, so records with different shapes still align, and any record missing a column simply gets an empty cell there.
Yes — it exports a real .xlsx workbook as well as .csv / .tsv, and you can pick a comma, tab, semicolon or pipe delimiter with an optional UTF-8 BOM for Excel.
Besides copying or downloading CSV, the tool can build a genuine .xlsx workbook in the browser (via a bundled spreadsheet engine) with a bold header row and auto-sized columns. For plain CSV, comma is the default; choose tab for a .tsv that pastes cleanly into spreadsheets, semicolon for European locales where the comma is the decimal separator, or pipe for pipe-delimited pipelines. Two options make Excel behave: switch line endings to CRLF, and enable the UTF-8 BOM so Excel opens accented and non-Latin characters correctly instead of as mojibake. You can also force every field to be quoted, choose how null and missing values appear, and write booleans as 1 / 0 for numeric imports.
It reads an array of objects, a single object, an array of arrays, an array of primitives, or NDJSON / JSONL, and you can include, exclude and reorder the output columns.
The parser accepts the standard array of objects (each object a row), a single object (one row), an array of arrays where the first inner array is treated as the header, an array of primitive values (a single value column), and NDJSON / JSONL where each line is its own JSON object — a mode it can auto-detect from an uploaded file. Once the columns are detected you get a column picker: click a header to include or exclude it from the output, and use the arrows to reorder columns left or right, with a one-click reset. The live preview and the row / column / size stats update as you change options, and only the selected columns are written to the CSV, TSV or .xlsx you export.
Detailed Explanation
📖How It Works
Converting JSON to CSV in Your Browser
The JSON to CSV Converter turns hierarchical JSON into flat, spreadsheet-ready CSV without ever uploading it. Paste JSON, drop in a .json, .txt or .ndjson file, or fetch a CORS-enabled URL, and it converts live as you type. It accepts an array of objects (the usual API response), a single object, an array of arrays (the first row taken as the header), an array of primitives, or an NDJSON / JSONL stream with one object per line. Because CSV has no nesting, nested objects are flattened into dot-notation columns by default — {“address”:{“city”:“NYC”}} becomes an address.city column — while arrays and any un-flattened objects are written as a JSON string inside the cell. The header row is the union of every key across all records in first-seen order, so heterogeneous objects still line up and a record missing a field gets an empty cell. Everything — parsing, flattening and serialisation — runs locally in JavaScript, so sensitive API dumps and exports never leave your machine.
Accepts array of objects, single object, array of arrays, array of primitives, or NDJSON / JSONL — live as you type
Nested objects flatten to dot-notation columns (address.city); arrays are serialised as a JSON string
Header is the union of all keys in first-seen order, with empty cells for missing fields
100% client-side — nothing is uploaded to any server
📋Use Cases
Getting API Data into Spreadsheets and Databases
JSON is what APIs return; CSV is what spreadsheets, databases and BI tools import, so this converter bridges the two. Paste a REST response and get a table you can open in Excel, Google Sheets or Numbers, or feed into a SQL COPY / LOAD DATA import or a data-warehouse loader. The Excel-friendly options matter here: enable the UTF-8 BOM and CRLF line endings so Excel opens accented and non-Latin text correctly, pick a semicolon delimiter for European locales where the comma is the decimal mark, or a tab delimiter to export a .tsv that pastes cleanly. For a wide API payload you can flatten nested objects into dot-notation columns, exclude the columns you do not need, and reorder the rest to match a target schema. NDJSON / JSONL input suits log lines and streaming exports, and when you need the reverse direction the companion CSV to JSON Converter flips the workflow back the other way.
Turns REST / API responses into Excel, Google Sheets, Numbers or database-import CSV
UTF-8 BOM + CRLF for Excel; semicolon for European locales; tab for a .tsv export
Flatten nested objects, then include / exclude and reorder columns to match a target schema
NDJSON / JSONL input suits logs and streaming; a companion tool does the reverse CSV → JSON
🔧Technical Details
Flattening, Header Union and RFC 4180 Escaping
Conversion runs in a debounced client-side effect on every keystroke. Standard input is JSON.parse-d; NDJSON / JSONL mode parses each non-empty line separately and reports the line number on an error. The rows are then normalised: an array of arrays uses its first row as the header, an array of primitives becomes a single value column, and an array of objects is flattened — a recursive walk turns nested plain objects into dot-path keys (address.city) when flattening is on, or leaves each nested object to be serialised whole when it is off. Arrays are always written with JSON.stringify, so one input record maps to exactly one output row rather than being exploded. The header is built as the union of all keys in first-seen order using a Set, so objects with differing fields align and gaps become empty cells. Each field is then escaped to RFC 4180: a value containing the active delimiter, a double-quote, a carriage return or a line feed is wrapped in double-quotes and internal quotes are doubled, and the whole file can be prefixed with a UTF-8 BOM and joined with LF or CRLF. Options cover the delimiter (comma, tab, semicolon or pipe), a header toggle, quote-every-field, a null placeholder and booleans as 1 / 0. The .xlsx export path dynamically imports an exceljs engine to build a real workbook with a bold header and auto-sized columns, and the whole input (up to 50 MB) is held and processed in memory.
Debounced live conversion; NDJSON mode parses per line and reports the failing line number
Recursive dot-path flattening of nested objects; arrays serialised with JSON.stringify (one record → one row)
Header is a first-seen-order union of all keys; fields escaped to RFC 4180 with BOM and LF / CRLF options
.xlsx export via a dynamically imported exceljs engine; whole file processed in memory (50 MB cap)
⚠️Limitations
Honest Limitations
The converter maps records to rows, so it is honest about the edges of that model. Arrays inside a record are serialised as a JSON string in one cell rather than exploded into multiple rows or spread across numbered columns, so a true one-to-many relationship is not normalised into a relational shape — that is a deliberate choice to keep one input record on one output row, but it means nested arrays land as JSON text. Flattening applies to nested plain objects (dot-path columns); with flattening off, nested objects are written whole as JSON strings. Very wide, heterogeneous data can produce a large sparse header because the column set is the union of every key seen. Everything is held in browser memory, so size is bounded: the tool accepts inputs up to 50 MB, and very large or very wide inputs use more RAM and can slow a low-memory device, where a streaming command-line tool such as jq is a better fit. Loading from a remote URL only works when that server sends permissive CORS headers, and the fetch fails with a clear message otherwise rather than silently.
Arrays are stringified into one cell, not exploded into rows or spread across columns
Flattening covers nested objects (dot-path); with it off, nested objects become JSON strings
A union header can be large and sparse for very heterogeneous records
Bounded by browser memory (50 MB cap); remote-URL loading needs permissive CORS or it fails clearly
🔒Privacy & Security
Privacy: Your Data Stays on Your Device
JSON exports often hold exactly the data you should not upload — API dumps, customer and order records, analytics events, health or HR data — and this converter is built so they never leave your machine. Input is read with the browser’s File API, parsed into memory, flattened and serialised to CSV locally in JavaScript, and any .xlsx workbook is generated on your device, with no server, upload, database, logging, API or CDN anywhere in the processing path. The tool works offline once cached, and closing the tab discards everything. The only moment anything touches the network is if you explicitly paste a remote URL for the tool to fetch, and even then the response is downloaded straight into your browser and sent nowhere else. The only optional network use anywhere on the site is consent-gated advertising, which never sees your file or its contents.
Read, parsed, flattened and serialised entirely in the browser
No server, upload, database, API or CDN in the processing path
Works offline once cached; closing the tab discards everything
Only optional network use is consent-gated ads, which never see your file
JSON to CSV Converter — inputs, options and limits
Capability
Support
Notes
Input shapes
Array of objects, single object, array of arrays, array of primitives, NDJSON / JSONL
Also pasted text, a .json / .txt / .ndjson file, or a CORS-enabled remote URL
Nested objects
Flattened to dot-notation columns
address.city style; toggle off to write each nested object as a JSON string
Arrays
Serialised as a JSON string in one cell
Not exploded into extra rows — one input record maps to one output row
Delimiters
Comma, tab, semicolon, pipe
Tab downloads as .tsv; semicolon suits European locales; RFC 4180 escaping throughout
Excel options
UTF-8 BOM, CRLF, real .xlsx export
BOM + CRLF make Excel open accented text correctly; .xlsx has a bold header and auto-sized columns
Columns & scale
Include / exclude / reorder, up to 50 MB
Header toggle, quote-all, null placeholder, booleans as 1 / 0; live 100-row preview, 100% client-side
The converter accepts several JSON shapes plus NDJSON / JSONL, flattens nested objects into dot-notation columns, serialises arrays as JSON strings, and escapes every field to RFC 4180 with a choice of delimiter and LF / CRLF endings. It exports CSV, TSV or a real .xlsx workbook, lets you include / exclude / reorder columns, and is bounded by a 50 MB browser-memory cap; remote-URL loading needs permissive CORS. Everything runs in the browser; nothing is uploaded.