How this JSON ⇄ CSV converter works
JSON and CSV are two of the most common ways to move tabular data between programs. JSON (JavaScript Object Notation) stores an array of objects where each object holds named fields; CSV (comma-separated values) stores a flat grid of rows and columns. This tool translates cleanly in both directions, entirely in your browser.
Going JSON → CSV, the converter reads your JSON array, gathers the union of every key across all objects to build the header row, then writes one row per object. Fields containing a comma, a double quote or a line break are wrapped in quotes and any internal quotes are doubled, following RFC 4180. Nested objects and arrays are JSON-stringified into a single cell so nothing is lost.
Going CSV → JSON, the first row becomes the property names and each later row becomes an object. The parser respects quoted fields, so commas, quotes and newlines inside quotes are kept intact, and you can choose comma, semicolon or tab as the delimiter.
[{"name":"Ada","city":"London, UK"},{"name":"Bob","age":30}] becomes the CSV below. Note that London, UK is quoted because it contains a comma, and Ada has no age so that cell is left empty while Bob has no city.| JSON (array of objects) | CSV (rows & headers) |
|---|---|
[ |
name,city,age |
Reference note: conversion is lossless for flat data. When CSV cannot represent a nested structure directly, the value is preserved as embedded JSON text, which round-trips back to the original object on the CSV → JSON pass.
Frequently asked questions
- How do I convert JSON to CSV?
- Choose the JSON → CSV mode, paste a JSON array of objects, and the CSV appears instantly. Each object becomes a row and the union of all keys becomes the headers. Use Copy output to grab the result.
- How do I convert CSV to JSON?
- Choose CSV → JSON mode and paste your CSV. The first row is the headers, and every following row becomes a JSON object keyed by those headers. The output is a pretty-printed JSON array.
- How are nested JSON objects handled in CSV?
- CSV is a flat format, so nested objects and arrays are JSON-stringified and placed inside a single quoted cell. No data is dropped, and the cell round-trips back to JSON.
- How do I handle commas inside CSV values?
- Any field containing a comma, double quote or line break is wrapped in double quotes, and internal quotes are doubled (" becomes ""). This is standard RFC 4180 escaping, so spreadsheets read it as one cell.
- Can I use a different delimiter (semicolon/tab)?
- Yes. In CSV → JSON mode a delimiter selector lets you parse comma, semicolon or tab separated input — useful for European spreadsheets that export with semicolons.
- Is my data uploaded?
- No. All parsing happens locally in your browser with JavaScript. Nothing you paste is sent to a server, so it is safe for private data.