JSON ↔ CSV Converter (Bidirectional)
Convert JSON to CSV or CSV back to JSON in your browser — with flattening, delimiter auto-detect, type-smart parsing, and a live preview table.
Drop files here
Drag & drop a file here, or click to browse. Files are read locally — never uploaded.
Conversion options
Paste JSON, drop a file, or load the sample to see a live conversion.
What this tool is best for
- Turning API responses into spreadsheets for analysis in Excel or Google Sheets.
- Converting exported CSV data back into clean JSON for your code.
- Quick data cleanup — inconsistent keys, nested objects, and tricky delimiters.
JSON to CSV converter online free (and CSV back to JSON)
JSON and CSV are the two most common ways data moves between systems — APIs speak JSON, spreadsheets speak CSV — and converting between them by hand is tedious and error-prone. This tool converts in both directions, live, as you type: paste a JSON array of API results and get a clean CSV for Excel, or paste exported CSV and get properly typed JSON for your code. No signup, no server round-trip, no trace of your data left behind.
Real-world data is messy, so the converter is built for the messy cases: objects with different keys in different rows, nested objects, arrays inside rows, API responses wrapped in envelopes like {"results": [...]}, and CSV files with semicolons, tabs, or quoted commas. Every edge case gets a clear, pinpointed error message — never a cryptic “Invalid JSON”.
This converter vs typical online converters
| Property | This converter | Typical converters |
|---|---|---|
| Bidirectional | Yes — JSON→CSV and CSV→JSON in one tool | Usually one direction only |
| Your data leaves the browser | Never — 100% client-side | Often uploaded to a server |
| Nested objects & arrays | Flatten, explode, join, or serialize — your choice | Often dropped or broken silently |
| Leading zeros & long IDs | Preserved as text automatically | Frequently destroyed (00721 → 721) |
| Error messages | Pinpointed with line and column numbers | Often just “invalid input” |
How JSON to CSV conversion works
The converter first finds your rows: a top-level array is used directly, a single object becomes one row, and an object wrapping an array — the classic API envelope like {"results": [...] } — is unwrapped automatically. Column headers are the union of every key found across all rows, so a field that only exists in row 47 still gets its own column instead of being lost.
Nested objects are flattened with dot notation (address.city) so no data disappears into an unreadable blob — or kept as JSON text if you prefer. Arrays are the interesting case: explode turns each element into its own row (an array of order objects becomes one row per order), join merges them into a single cell with a delimiter you pick, and serialize keeps the raw JSON. The output follows RFC 4180 quoting, so fields containing commas, quotes, or line breaks are escaped correctly for Excel and Google Sheets.
How CSV to JSON conversion works
The delimiter is auto-detected from comma, semicolon, tab, and pipe by checking which one produces consistent column counts — or you can set it manually. Quoted fields, escaped quotes (""), and even line breaks inside quotes are parsed properly, and any structural problem is reported with an exact line and column (for example, a row with 3 fields when the header has 4).
Smart type conversion turns 29.99 into a number, true into a boolean, and null into null — but it deliberately refuses to convert values with leading zeros (00721) or very long digit strings, which are almost always ZIP codes, phone fragments, or database IDs that must stay text. Disable the toggle if you want every value kept as a string.
Related developer tools
Pair this with ToolsOfWeb's JSON Formatter to validate and pretty-print JSON before converting it, the Regex Tester to clean up messy CSV fields with patterns, or the Base64 Converter when your data arrives encoded.
FAQs
How do I convert JSON to CSV?+
Paste your JSON array of objects into the converter and the CSV is generated live — headers are taken as the union of all keys across every row, so inconsistent objects are handled automatically. Nested objects can be flattened into dot-notation columns (address.city) or kept as JSON text, and arrays can be exploded into rows, joined with a delimiter, or serialized. Nothing is uploaded: conversion runs entirely in your browser.
What happens to nested objects and arrays in my JSON?+
Nothing is ever silently dropped. Nested objects are flattened to dot-notation columns by default (e.g. "address": {"city": "Lahore"} becomes an address.city column), or kept as compact JSON text if you prefer. Arrays can be exploded so each element becomes its own row, joined into one cell with a delimiter you choose, or serialized as JSON text.
Is my data uploaded to a server?+
No. The conversion runs 100% in your browser using JavaScript — your data never leaves your device. That makes this converter safe for API responses, customer lists, and other sensitive data that you should not paste into server-side tools.
Why did my ZIP code or ID lose its leading zeros?+
It should not here: the smart type conversion deliberately keeps values like "00721" or very long numeric IDs as text instead of turning them into numbers. Plain numbers ("29.99"), booleans ("true"/"false") and "null" are still converted to their proper JSON types. Turn off smart type conversion if you want every value kept as a string.
Can I open the converted CSV in Excel?+
Yes. The output follows RFC 4180 quoting rules, so commas, quotes, and line breaks inside fields are escaped correctly. If Excel shows garbled characters for non-English text, enable the "Add UTF-8 BOM" option before downloading — that tells Excel to read the file as UTF-8.
More free tools
Want guides and tips? Visit the ToolsOfWeb blog or go back to the homepage.
