JSON to CSV
Flatten JSON objects into a spreadsheet-ready CSV table, entirely in your browser.
JSON input
Paste a JSON array of objects (or a single object). Nested objects become dotted column names, scalar arrays can be joined with a configurable separator, and columns are collected in first-seen order or sorted alphabetically. Output follows RFC 4180 with minimal or forced quoting and a choice of CRLF or LF line endings. Formula-like cells can be prefixed with an apostrophe before opening the CSV in a spreadsheet. Parse errors include a line and column with a plain-language fix.
- Users array — Becomes a name,age header followed by one CSV row per object.
- Nested profile — Flattened into columns such as user.name and user.profile.role.
- Formula-safe export — With formula neutralization enabled, spreadsheet-hostile cells are prefixed with an apostrophe.
CSV output
No CSV yet
Paste a JSON array of objects or load an example.
Examples
Users
[{"name":"Ada","age":36},{"name":"Gráce","age":29}]name,age
Ada,36
Gráce,29
One header row plus one row per object.
Nested profile
{"id":1,"user":{"name":"Ada"}}id,user.name
1,Ada
Nested keys become dotted column names.
Quoted comma
[{"name":"Doe, Jane"}]name
"Doe, Jane"
Minimal RFC 4180 quoting protects the comma inside the field.
About this tool
Spreadsheets need rectangular rows; API responses are trees. This converter flattens a JSON array of objects into a CSV table: nested objects become dotted column names, scalar arrays can be joined inside a cell, and columns are collected from all rows in first-seen order. Ragged objects are filled with empty cells so every row has the same number of fields.
Serialization follows RFC 4180: fields are quoted only when they contain a delimiter, a quote or a line break, quotes are doubled, and CRLF or LF endings are selectable. A formula-neutralization option prefixes cells beginning with =, +, - or @ with an apostrophe so a spreadsheet does not execute them. Optional warnings report nulls, collisions and nested arrays.
Parse errors are mapped to a line and column with a plain-language fix, and invalid input never replaces the last good output. All conversion happens locally — JSON pasted here is never uploaded.
What this tool does not do
- Nested arrays of objects cannot be represented as multiple CSV rows; they are flattened or JSON-stringified.
- Integers beyond JavaScript's safe range may be rounded by JSON.parse before conversion.
- CSV carries no type information; spreadsheet programs re-interpret values on import.
- Inputs are held in memory; very large JSON documents can slow the browser.
How to use this tool
Paste JSON
Use an array of objects or a single object. A single object is treated as one row.
Choose output options
Select comma, semicolon or tab, CRLF or LF endings, and whether to flatten arrays, sort columns or quote every field.
Protect spreadsheet cells
Turn on Neutralize formulas when the JSON comes from an untrusted source and cells may begin with =, +, - or @.
Review warnings
The output panel reports null values, column collisions and nested arrays that could not be represented as plain cells.
Copy or download
Copy the CSV or download data.csv. Shortcut: Mod/Ctrl+Shift+C copies the result.
Use cases
API export
Move a JSON endpoint response into a spreadsheet for a non-technical colleague.
Fixture data
Turn JSON test fixtures into a tabular import file for a database or admin panel.
Reporting
Flatten nested metadata into columns for a quick pivot or chart.
Serialization settings
| Setting | Behavior |
|---|---|
| Delimiter | Comma, semicolon or tab; fields containing it are quoted |
| Line endings | CRLF for spreadsheet compatibility or LF for Unix tooling |
| Nested objects | Flattened to dotted column names such as user.profile.role |
| Scalar arrays | Joined with a configurable delimiter, or kept as a JSON string |
| Column order | First seen across all rows, or alphabetical |
| Formula neutralization | Prefixes = + - @ cells with an apostrophe before spreadsheet import |
Numbers and booleans from JSON are written as plain cell text; dates remain whatever string the source provided.
Common mistakes
Mistake:Expecting arrays of objects to become multiple rows.
Fix:Only the outer array becomes rows; nested arrays are joined inside a single cell unless you flatten them upstream.
Mistake:Opening untrusted CSV without formula neutralization.
Fix:Enable the option when cells may start with =, +, - or @ to prevent spreadsheet formula execution.
Mistake:Assuming dates and numbers are typed by the converter.
Fix:CSV has no type system; values are written verbatim and the spreadsheet decides how to parse them.
Frequently asked questions
How are nested objects converted?
Nested object keys are joined with dots, so {"user":{"name":"Ada"}} produces a column named user.name. Arrays of scalar values are joined inside a single cell by default; you can turn Flatten arrays off to keep the JSON representation instead. Arrays of objects do not become multiple rows — the outer array defines the rows.
What happens when objects have different keys?
The column list is the union of all keys seen in any row, in first-seen order unless Sort columns is enabled. Rows that lack a column receive an empty cell, so the CSV stays rectangular.
Why does my spreadsheet execute a cell as a formula?
CSV has no type metadata, so a cell beginning with =, +, - or @ can be interpreted as a formula. Turn on Neutralize formulas in the options: the converter prefixes those cells with an apostrophe, which most spreadsheets treat as literal text.
Which delimiter and line endings should I use?
Comma with CRLF is the RFC 4180 default and works in Excel. In locales where comma is the list separator, choose semicolon; for Unix tooling and diffs choose LF line endings. Fields containing the chosen delimiter are always quoted.
Does it preserve large numbers exactly?
JSON.parse runs in the browser's JavaScript engine, so integers beyond Number.MAX_SAFE_INTEGER can be rounded before conversion. For exact large identifiers, keep them as strings in the source JSON.
What do the warnings mean?
Warnings report null values, key collisions after flattening and nested arrays that were joined or stringified. They are informational: the CSV is still produced, but the notices tell you where information may have been simplified.
Is my JSON uploaded anywhere?
No. Parsing, flattening and CSV serialization run locally in this tab. Nothing is stored or transmitted.
Related guides
From JSON to Protobuf: Inferring a Schema From a Sample
How to derive a proto3 message from a JSON object — scalar inference, nested messages, repeated fields — and the edge cases to review.
Converting CSV to JSON: A Practical Guide
How to turn spreadsheet-style CSV into structured JSON — header handling, quoting and escaping rules, delimiter variants, type conversion gotchas, and how to go the other way.
References & standards
Related tools
CSV to JSON Converter
Paste CSV data and convert it to pretty-printed JSON instantly — supports custom delimiters, header row toggling, and value trimming.
CSV Data Viewer
Paste CSV and inspect it as a sortable, searchable table with delimiter detection and inline export.
CSV to SQL Converter
Generate SQL INSERT statements from CSV data
JSON Formatter
Advanced JSON formatter with validation, analysis, search, multiple format modes, file upload, and comprehensive statistics.