Magic Tools
Back

JSON ↔ CSV Converter

JSON Input157 chars
CSV Output60 chars
name,age,city
Alice,30,New York
Bob,25,London
Carol,35,Tokyo

Notes

  • • JSON input must be an array of objects with consistent keys
  • • CSV values containing commas or quotes are automatically escaped
  • • CSV → JSON auto-converts numbers and booleans to native types
  • • All processing is 100% local — no data sent to any server

How to use / Why use this tool / FAQ

How to use

Choose a direction (JSON → CSV or CSV → JSON), paste your data into the input panel, and the converted result appears instantly. Click Download to save the file, or Copy to copy to clipboard. Use 'Load example' to try sample data.

Why use this tool

Switch effortlessly between JSON (used by APIs and code) and CSV (used by spreadsheets and data tools). No server upload — your data stays in the browser.

FAQ

How do I convert JSON to CSV online?
Paste a JSON array of objects into the input panel — the CSV appears instantly with a header row built from the object keys. Click Download to save a .csv file you can open in Excel or Google Sheets.
What JSON structure is supported?
The input must be a JSON array of objects (e.g. [{"a":1},{"a":2}]). Nested objects are JSON-stringified into a single CSV cell. Objects with different keys are merged into one unified header row.
How do I convert CSV back to JSON?
Switch the direction to CSV → JSON and paste your CSV. The first row is treated as the header and becomes the JSON keys; every following row becomes one object in the output array.
Does it handle commas and quotes inside values?
Yes. Values containing commas, quotes, or line breaks are escaped with standard CSV quoting on the way out, and quoted fields are parsed correctly on the way in.
Does CSV → JSON auto-detect types?
Yes. Numbers and booleans (true/false) are automatically converted to native JSON types. Everything else remains a string.
Is there a file size limit?
There is no hard limit — processing is done in the browser. Very large files (100MB+) may slow down depending on your device.