JSON to CSV Converter
Convert any JSON (nested objects, arrays of objects, wrapped responses) into clean CSV with smart array targeting, dot/bracket flattening, schema discovery preview, custom delimiters, and one-click samples.
Your ad blocker is preventing us from showing ads
MiniWebtool is free because of ads. If this tool helped you, please support us by going Premium (ad‑free + faster tools), or allowlist MiniWebtool.com and reload.
- Allow ads for MiniWebtool.com, then reload
- Or upgrade to Premium (ad‑free)
About JSON to CSV Converter
Welcome to the JSON to CSV Converter, a free online tool that flattens any JSON payload — flat arrays, nested objects, deeply wrapped API responses — into clean, spreadsheet-ready CSV. Most online converters only handle the trivial case of [{...}, {...}] at the root and choke when your JSON looks like {"data": {"items": [...]}}. This tool does smart auto-detection of the tabular array, exposes a JSONPath-style selector for unusual shapes, and gives you two flattening modes (dot and bracket) plus a schema preview so you know exactly what columns will land in your spreadsheet before you download.
What is the JSON to CSV Converter Used For?
JSON is the lingua franca of web APIs and modern data pipelines, while CSV is still king for spreadsheets, BI dashboards, and data analysis tools. Converting from one to the other is one of the most common chores in a data engineer's day. Typical use cases include exporting an API response into Excel for stakeholders, preparing JSON dumps for import into Postgres or BigQuery, feeding JSON logs into Pandas or R for analysis, and quickly scanning a noisy nested response in a friendlier tabular form.
Key Features
- Smart array auto-detection: the converter walks your JSON and picks the largest, most table-like array — usually the one you actually wanted.
- JSONPath selector: override auto-detection with a path like
data.usersorresults[0].rowsto drill into wrapped responses. - Two flatten modes: dot notation (
address.city) for clean column names, or bracket arrays (tags[0],tags[1]) when each element should be its own column. - Schema discovery: a panel of column pills with type badges (string, integer, number, boolean, mixed) so you can audit the output before downloading.
- Live preview table: the first eight rows render as an HTML table — instant verification that your data lined up correctly.
- Custom delimiters: comma (CSV), semicolon (European Excel), tab (TSV), pipe, or any single character you specify.
- Quoting modes: minimal (RFC 4180), quote-all, quote non-numeric, or never (with backslash escaping).
- Excel-friendly line endings: toggle between LF and CRLF.
- Optional header row.
- One-click samples: flat array, wrapped response, nested objects, GitHub-style API, and weather forecast.
- Copy and download: grab the CSV instantly or save it as a
.csvfile.
How Does the Converter Handle Nested Objects and Arrays?
Real-world JSON is rarely flat. The converter's flattening engine handles the two main shapes intelligently:
Nested Objects → Dot Notation
An object inside an object becomes a dotted column name. So a record like {"id": 1, "address": {"city": "Tokyo", "zip": "100-0001"}} produces three columns: id, address.city, address.zip. This convention is used by Pandas json_normalize, Splunk, Elasticsearch, and dozens of other tools — your downstream pipelines will already understand it.
Nested Arrays → Two Strategies
Arrays of scalars (e.g. "tags": ["red", "blue"]) and arrays of objects (e.g. "orders": [{...}, {...}]) get different treatment depending on the chosen flatten mode:
- Dot mode: arrays of scalars are joined with the pipe character into a single cell (
red|blue); arrays of objects are JSON-encoded so the data isn't lost. This keeps the column count predictable. - Bracket mode: every element gets its own indexed column —
tags[0],tags[1],orders[0].id,orders[0].total. Best when records have a known fixed-length array. - Keep nested as JSON: nested structures are serialized as a JSON string and inserted into one cell. Useful when the destination spreadsheet has a JSON-aware column or you want to preserve the original shape.
What is the JSONPath Selector For?
Most public APIs wrap their data in extra metadata: status codes, paging info, request IDs. A typical response looks like:
Auto-detection will usually find the inner array, but for unusual or deeply nested shapes you can supply the path explicitly. The selector supports dotted keys and bracketed numeric indices:
data— drill into thedatakeydata.users— drill intodata, thenusersresults[0].rows— first item ofresults, then itsrowskey(empty)— auto-detect the most table-like array
Does It Produce Excel-Compatible CSV?
Yes. The default settings (comma delimiter, minimal quoting, header row, LF line endings) produce strict RFC 4180 output that opens cleanly in Excel, Google Sheets, Numbers, LibreOffice Calc, Pandas read_csv, R read.csv, and every database COPY FROM command. For European Excel locales that use semicolon as the field separator, switch the Delimiter dropdown to Semicolon. For Windows-native tooling that prefers \r\n line endings, switch Line Ending to CRLF.
How are Missing Fields Handled Across Rows?
JSON arrays often contain heterogeneous records — one object has a middle_name, the next does not. The converter walks every record and collects column names in first-seen order; any record missing a column gets an empty cell in that position. This is the same behavior as Pandas json_normalize and avoids silently dropping fields that only appear in some records.
Practical Use Cases
For Developers
- Convert REST API responses to CSV for exploration in a spreadsheet
- Flatten MongoDB or Firestore exports for import into a relational database
- Turn JSON log lines into a tabular format for analysis
- Generate test fixtures by combining sample JSON with the bracket-mode output
For Data Analysts & Scientists
- Quickly preview API data in tabular form without writing a Pandas script
- Prepare JSON from web scraping for import into Excel, Tableau, or Power BI
- Convert a JSON dataset into a CSV for use in Jupyter or RStudio
- Audit nested fields with the schema-discovery panel before the actual import
For Marketers & Operators
- Export data from JSON-emitting tools (analytics, CRM exports) into Google Sheets
- Build pivot tables or charts on top of JSON API output
- Hand a friendly CSV to non-technical stakeholders without showing them raw JSON
How to Use This Tool
- Paste JSON: paste your JSON into the input box, or click a Quick Sample chip to load a typical API payload.
- Pick the array: leave the JSONPath field empty to let the tool auto-detect the tabular array, or type a path like
data.usersto target a wrapped array. - Choose flatten mode: select Dot notation for clean column names, Bracket arrays to expand each array element, or Keep nested as JSON to preserve sub-structures verbatim.
- Pick delimiter and quoting: select comma, semicolon, tab (TSV), pipe, or a custom character, then choose a quoting mode and line ending.
- Convert and review: click Convert to CSV. Inspect the schema panel and preview table, then copy the result or download it as a
.csvfile.
Tips for Best Results
- Validate first: the live indicator under the input box flags JSON syntax errors before you click Convert.
- Check the schema panel: a column tagged mixed means the same field has different types across records — usually a sign that an upstream ingestion bug needs fixing.
- Use bracket mode for fixed arrays: if every record has, say, exactly four scores, bracket mode gives you four clean columns rather than a single pipe-joined cell.
- For European Excel: pick Semicolon delimiter so that
1,5(one and a half) doesn't get split into two cells. - For Excel on Windows: pick CRLF line endings to avoid the "all in column A" issue.
- Quote everything for safety: if your data contains commas, newlines, or your delimiter character, prefer Quote All Fields for the most defensive output.
Frequently Asked Questions
What happens if my JSON has multiple arrays?
Auto-detection picks the largest one that contains objects. If that's not the array you want, supply a JSONPath like orders or line_items to target the right one.
Can I convert a single JSON object instead of an array?
Yes — a single object becomes a one-row CSV with each top-level field as a column. The flattening rules still apply.
What about JSON with non-finite numbers (NaN, Infinity)?
Standard JSON does not allow these literals, but if your input contains them and parses successfully, they are converted to empty cells in the CSV output to keep the file valid.
Why are some boolean values rendered as true / false?
To keep the CSV human-readable. If your downstream tool needs 1 / 0, do a search-and-replace after download or process the JSON beforehand.
Does the converter validate that all records have the same shape?
No — heterogeneous records are handled gracefully (missing fields become empty cells). The schema panel surfaces type drift via the mixed badge so you can spot inconsistencies.
How big a JSON can I convert?
The tool comfortably handles JSON inputs up to a few megabytes in the browser and on the server. For very large datasets (tens of MB or more), prefer a streaming offline tool such as jq or a Python script with ijson.
Is my data sent to a server?
The conversion is performed on the MiniWebtool server to leverage Python's robust CSV writer and JSON parser. We do not log, store, or share your input. Responses are served with no-cache headers. For maximum confidentiality with sensitive data, prefer offline processing.
Additional Resources
Reference this content, page, or tool as:
"JSON to CSV Converter" at https://MiniWebtool.com/json-to-csv-converter/ from MiniWebtool, https://MiniWebtool.com/
by miniwebtool team. Updated: Apr 25, 2026
Related MiniWebtools:
Other Text Tools:
- Anagram Generator
- Bionic Reading Converter New
- Compare Two Strings Featured
- Find Longest Line
- AI Language Detector
- Text Line Processor
- XML Validator
- Text to Speech Reader New
- Text Column Extractor New
- JSON to YAML Converter New
- Regex Tester New
- Diff Checker New
- CSV to JSON Converter New
- Image to Base64 Converter New
- API Tester New
- ASCII Table Reference New
- Webhook Tester New
- AI Blog Title Generator New
- AI Hashtag Generator New
- AI Slogan Generator New
- AI Article Outline Generator New
- Online Notepad New
- TOML to JSON Converter New
- JSON to CSV Converter New
- XML to JSON Converter New
- SQL to MongoDB Query Converter New