(Dokumentaatio englanniksi)
What it does
Converts between JSON and CSV in both directions. JSON → CSV takes an array of objects (or a single object) and produces a table: the union of all keys becomes the header row, and one row follows per object. CSV → JSON parses RFC 4180 quoting and rebuilds an array of objects. A Swap button flips the direction and carries the output across as the new input, so a document round-trips without copy and paste. A stat line under the grid counts rows or items and the output size in bytes.
How to use it
- Pick a direction with the segmented control: JSON → CSV or CSV → JSON. Swap does the same and moves the current output into the input.
- Paste your document into the left pane.
- The converted result appears live on the right. Copy takes it.
- Read the stat line:
N rows · M bytesfor JSON → CSV,N items · M bytesfor CSV → JSON.
Examples
[{"name":"ada","role":"admin"},{"name":"bob","role":"user"}]
becomes:
name,role
ada,admin
bob,user
Stat line: 2 rows · 28 bytes.
A field containing a comma, a quote, or a newline is quoted per RFC 4180: [{"price":"1,000"}] becomes price on the header line and "1,000" on the data line. CSV → JSON reverses the quoting exactly.
How the table model works
Both formats express the same shape: a table of rows with named columns. JSON spells it an array of objects; CSV spells it a header line plus one line per record:
| Concept | JSON | CSV |
|---|---|---|
| table | array of objects | the whole file |
| column | object key | header entry |
| row | one object | one line |
| cell | value | field |
JSON → CSV walks the input once and collects every key it meets, in order of first appearance, as the header. An object missing a key gets an empty cell.
That is where the formats stop being equivalent, because CSV cells are plain text:
- A nested object or array becomes its string form (
[object Object],1,2) and does not come back. - Numbers and booleans become text: the value
1round-trips as the string"1". - An empty CSV cell reads back as
"".
So JSON → CSV → JSON is lossy whenever values are more than plain strings or numbers. Use the pair for tabular data, and keep nested documents in JSON.
Good to know
- Deterministic: column order follows first appearance of each key; output uses
\nline breaks with no trailing newline. - Round-trip check: convert one way, hit Swap, convert back, and diff the two documents to see exactly what a spreadsheet would keep.
- Private: all conversion runs locally in your browser.
- Related tools: JSON Formatter, JSON Validator, JSON Minify.