How to Convert JSON to CSV
- Pick JSON → CSV at the top and paste your JSON into the input panel (or click Sample to try it).
- The output panel updates automatically. Nested objects are flattened into dot-notation columns, mixed-shape rows are aligned, and you can choose comma, semicolon, tab, or pipe as the delimiter.
- Hit Copy or Download to grab the resulting
.csvfile.
How to Convert CSV to JSON
- Switch to CSV → JSON and paste your CSV. The delimiter is detected automatically — comma, semicolon, tab, and pipe all work without configuration.
- The right-hand panel shows pretty-printed, syntax-highlighted JSON. Toggle Infer types to coerce
"42"into a number and"true"into a boolean, or leave everything as strings. - Copy or download the result as a
.jsonfile.
Handling Nested JSON
Most online converters give up the moment your JSON has a nested object. CodeScrub flattens nested keys into dot notation so they survive the round trip. Given:
{ "user": { "name": "Ada", "address": { "city": "London" } } }you get a CSV with the columns
user.name, user.address.city
Going the other way, toggle Unflatten dot keys in CSV → JSON mode and those columns rebuild into a proper nested object. Arrays inside objects are expanded into rows when the structure is unambiguous, so an API response with { meta, users: [...] } becomes one CSV row per user with the meta repeated.
Supported Formats
- Comma-separated (CSV)
- Semicolon-separated (common in European exports)
- Tab-separated (TSV)
- Pipe-separated
On CSV → JSON, the delimiter is auto-detected. Quoted fields, escaped commas, and inconsistent column counts are all handled correctly. Everything runs in your browser — your data is never uploaded anywhere.