Example 1: Convert JSON to CSV
Input (two objects with different keys):
[
{"id": 1, "name": "Anna Müller", "address": {"city": "Köln", "zip": "50667"}, "tags": ["admin", "dev"], "price": 19.9},
{"id": 2, "name": "Ben \"Bo\" Schulz, Jr.", "address": {"city": "Bonn"}, "tags": [], "active": true}
]
Output (default: comma, arrays as JSON text):
id,name,address.city,address.zip,tags,price,active
1,Anna Müller,Köln,50667,"[""admin"",""dev""]",19.9,
2,"Ben ""Bo"" Schulz, Jr.",Bonn,,[],,true
The result of the first example as a table| id | name | address.city | address.zip | tags | price | active |
|---|
| 1 | Anna Müller | Köln | 50667 | ["admin","dev"] | 19.9 | |
| 2 | Ben "Bo" Schulz, Jr. | Bonn | | [] | | true |
In words: Two objects become 2 data rows and 7 columns. The columns combine all keys, the nested object becomes “address.city” and “address.zip”, and fields missing from an object are left empty. The name containing a comma and quotation marks is quoted, and the quotation mark inside it is doubled (RFC 4180). The “tags” array appears as JSON text in one cell. The postal code remains “50667”, and the number 19.9 remains 19.9.
Example 2: Convert CSV from Excel to JSON
Input (semicolon separator, comma decimals, a quoted field with a line break):
id;name;price;active;note
1;Anna Müller;19,90;true;
2;"Ben ""Bo"" Schulz";5;false;"Zeile 1
Zeile 2"
Output (delimiter detected automatically, comma decimal separator):
[
{
"id": 1,
"name": "Anna Müller",
"price": 19.90,
"active": true,
"note": ""
},
{
"id": 2,
"name": "Ben \"Bo\" Schulz",
"price": 5,
"active": false,
"note": "Zeile 1\nZeile 2"
}
]
In words: The tool detects the semicolon as the delimiter and turns each row into an object using the header names. “19,90” becomes the number 19.90, “5” becomes the number 5, and “true” becomes a JSON boolean. The field containing a line break remains a single string with \n, and doubled quotation marks become a single quotation mark. The empty last cell of the first row becomes an empty string.
Example 3: Nested data and arrays
Input:
[{"id": 1, "user": {"name": "Anna", "address": {"city": "Köln"}}, "tags": ["admin", "dev"]}, {"id": 2, "user": {"name": "Ben"}, "tags": ["dev"]}]
Arrays as JSON text:
id,user.name,user.address.city,tags
1,Anna,Köln,"[""admin"",""dev""]"
2,Ben,,"[""dev""]"
Expanded arrays:
id,user.name,user.address.city,tags.0,tags.1
1,Anna,Köln,admin,dev
2,Ben,,dev,
In words: Nested objects are flattened using dot notation: “user” and “address” become “user.address.city”. For arrays, you have a choice: As JSON text, the number of columns stays the same and nothing is lost. When expanded, each element gets its own column (“tags.0”, “tags.1”), and the row with only one tag leaves the second column empty.