Author Jikwang Kim (maintainer)Last updated bal.pe.kr

JSON ↔ CSV Conversion Guide

Updated 2026-07-11 · Everything below runs in your browser — no upload.

1. What the converter does

This tool turns JSON into CSV and CSV back into JSON entirely in your browser. The hard part of JSON → CSV is that JSON is a tree (objects inside objects, arrays inside objects) while CSV is a flat table of rows and columns. The converter bridges the two by flattening nested structures into dot-notation columns and letting you decide how arrays are laid out.

2. Accepted JSON shapes

  • Array of objects — the most common case; each object becomes one row.
  • Single object — becomes a single-row table.
  • Array of primitives[1, 2, 3] becomes one column named value.
  • Deeply nested — objects and arrays at any depth are handled per your options.

Columns are collected as the union of all keys across every row, in first-seen order. A record missing a key simply gets an empty cell.

3. Flattening nested objects (dot notation)

With Flatten nested objects on, a nested key path is joined with a dot and used as the column name:

{ "id": 1, "address": { "city": "London", "zip": "SW1A" } }

→  id,address.city,address.zip
   1,London,SW1A

Depth is unlimited: a.b.c.d works. If you turn flattening off, only top-level keys become columns and any nested object/array is written as a compact JSON string in a single cell.

4. Array handling

Arrays are the second source of nesting. You choose how to lay them out:

Mode{ tags: ["a","b"] } becomes
Index columnscolumns tags.0=a, tags.1=b
Joinone column tags=a; b
JSON stringone column tags=["a","b"]
Explodetwo rows, tags=a and tags=b

Explode is the most useful differentiator for un-nesting API responses. It emits one row per array element, repeating the other fields. When several array fields exist in a record it produces the cartesian product, so keep an eye on row counts for large arrays.

5. Delimiters, header, and BOM

  • Delimiter — comma (,), semicolon (;), or tab. Semicolon is common in locales where the comma is a decimal separator; tab produces TSV.
  • Header row — include or omit the first row of column names.
  • UTF-8 BOM — prepend a byte-order mark so Excel on Windows opens non-ASCII text (Korean, emoji, accents) in the correct encoding. Google Sheets and most parsers accept both.

6. Escaping — RFC 4180

The converter follows RFC 4180, the de-facto CSV standard. A field is wrapped in double quotes when it contains the delimiter, a double quote, or a line break, and any embedded double quote is doubled:

value:  she said "hi", ok
csv:    "she said ""hi"", ok"

This is why a cell can safely contain commas and multi-line text. The default line ending is \r\n, also per the standard.

7. CSV → JSON

Switch the direction and the tool parses CSV back into an array of JSON objects:

  • Auto delimiter detection — the first line is scanned for the most frequent of , ; tab.
  • Header row — the first row supplies keys; turn it off to get field1, field2
  • Type inference"123" → number, "true"/"false" → boolean, "null" → null. To avoid corrupting IDs, a value becomes a number only when it round-trips exactly, so 007 and 010-1234 stay strings.
  • Unflatten — dot-notation headers are rebuilt into nested objects, and numeric segments become arrays: address.city{ address: { city } }, tags.0{ tags: [ ... ] }.

Because flatten and unflatten are inverses, a nested JSON → CSV → JSON round-trip reconstructs the original structure (numeric strings become numbers when type inference is on).

8. Privacy and limits

There is no server. Your data is parsed and serialized locally with JavaScript and is never uploaded; the page works offline once loaded. Because everything is in memory, extremely large inputs (hundreds of MB) may be slow or hit browser limits, and explode over multiple large arrays can multiply row counts quickly.