JSON to CSV Converter

Convert JSON to CSV online — free, instant and private. Your file is processed in your browser, never uploaded.

CSV delimiter
Result

Converted files and a preview will appear here.

Ready. Choose a table file to convert.

How the conversion works

  • An array of objects becomes rows and columns; nested objects are flattened into dotted-key columns like address.city.
  • Pick the delimiter that matches your data — comma, semicolon or tab.

Your table file is converted in your browser. Nothing is uploaded to BroBroGo.

FAQ

How do I convert JSON to CSV?

Drop your JSON file and click convert — the CSV file is ready to download in seconds, with a preview of the result. Everything runs on your device.

How large a file can I convert?

Up to 8 MB, 10,000 rows and 200 columns per file. Larger data sets are best split into smaller files first.

What Happens When JSON Meets CSV

JSON and CSV are built on fundamentally different assumptions. JSON represents data as a tree of typed nodes – numbers, strings, booleans, null, arrays, objects – that can nest arbitrarily deep. CSV is a flat, untyped table: rows and columns, nothing more. Converting from JSON to CSV means you must flatten that tree into a grid, discard every type annotation, and serialise everything as plain text. There is no way to preserve structure, so the conversion is inherently lossy.

This tool handles that flattening automatically, but understanding what happens under the hood helps you predict the result. When you upload a JSON file that is table-shaped (an array of objects or an array of arrays), the tool iterates over each element. For an array of objects, every top-level key becomes a column header. If an object contains nested objects, those keys are joined with a dot: for example, {"address": {"city": "Berlin"}} becomes a column named address.city with value Berlin. Arrays of arrays are simpler: each inner array becomes a row, and its elements become column values in order; no header keys exist, so no header row is generated. If an object contains a nested array, the whole array stays in a single cell as its JSON text.

All type information is stripped. Numbers like 42 become the string "42"; booleans become "true" or "false"; null becomes an empty cell. Leading zeros in numbers are lost because JSON numbers do not preserve them – 0123 in JSON is not valid anyway (it would be interpreted as octal in some parsers), but even if you have a string like "0123" that looks like a number in the source, the tool converts it as a string and keeps the zeros. However, if the value is actually a JSON number, it will be written without leading zeros.

How the Tool Flattens Your JSON

The flattening algorithm is straightforward but has to satisfy a few rules derived from the CSV standard (RFC 4180) and practical constraints.

Array of Objects

If your JSON looks like this:

[
  { "id": 1, "name": "Alice", "address": { "city": "Paris", "zip": 75001 } },
  { "id": 2, "name": "Bob",   "address": { "city": "London", "zip": "EC1A" } }
]

The tool produces two rows plus a header:

id name address.city address.zip
1 Alice Paris 75001
2 Bob London EC1A

Dot‑path notation flattens one level. If there were deeper nesting, e.g., contact.phone.home, the path would extend accordingly. The tool does not attempt to “unflatten” multiple nested paths into separate rows; it keeps everything in one row per source object. If two objects have different sets of keys, the union of all keys becomes the header; missing values become empty cells.

Array of Arrays

For simple lists of lists:

[
  ["Alice", 34, true],
  ["Bob", 28, false]
]

The output has no header. Each sub‑array becomes a row. If the inner arrays have different lengths, the tool pads shorter rows with empty cells.

Delimiter and Quoting

You choose the delimiter: comma (,), semicolon (;), or tab (\t). This choice affects both readability and compatibility with downstream tools. CSV quoting rules are applied automatically: if a field contains the delimiter, a double‑quote, or a line break, the entire field is wrapped in double quotes, and any double‑quote inside is escaped by doubling it (""). For example, a field containing Paris, TX with a comma delimiter becomes "Paris, TX". The tool does this for you – no manual escaping needed.

Choosing the Right Delimiter

The fact that CSV permits different delimiters is a historical accident, but it matters in practice. Comma‑separated values are the de facto standard in English‑language environments. However, many European locales use the comma as a decimal separator, so spreadsheet programs in those regions often expect a semicolon as the field delimiter. If you open a comma‑delimited CSV in Excel with a German locale, numbers like 1,5 (one and a half) will be interpreted as two columns unless you specifically tell Excel to use a comma delimiter. By offering semicolon and tab options, this tool lets you produce a file that opens correctly in your target application without extra configuration.

Tab‑delimited files are less common but avoid both of these problems: tabs rarely appear inside data, and they never conflict with decimal separators. The trade‑off is that some spreadsheet programs may not recognise a .csv extension with tab delimiters – you might need to rename the file or use a manual import wizard.

Choose your delimiter based on:

  • Target application: Excel for Windows (default comma), Excel for German locale (semicolon), Google Sheets (handles comma or tab), database import tools (often tab).
  • Data content: If your data contains many commas and few tabs, tabs are safer. If it contains many tabs, commas are safer.
  • Locale settings: If you regularly share files with colleagues using a non‑English locale, semicolon is the safe choice.

The tool shows you a preview of the table after conversion, so you can verify that the delimiter is correctly separating columns before you download.

What You Lose in the Conversion

Type information disappears entirely. In the JSON source, 123 is a number; in CSV it becomes the string "123". When you later open that CSV in a spreadsheet, the application may try to guess the original type – and it may guess wrong. Phone numbers like 1-800-FLOWERS might be treated as text, but numbers with leading zeros (such as 00123) could lose their zeros if the value was originally a JSON number (123) – because JSON numbers lose leading zeros by definition. If your JSON represents a ZIP code as a number 02139, it is stored as the number 2139 in JSON itself, so the tool will output 2139 in CSV. To preserve leading zeros, the source JSON must store such values as strings: "02139".

Booleans become "true" and "false" as strings. Null becomes an empty cell – or in some interpretations the literal string "null", but this tool writes an empty cell. There is no way to distinguish between a null value and an empty string "" in the output.

Nested structure is lost. The dot‑path notation preserves the name of the nested field but not the fact that it was nested. When you later re‑import the CSV into a JSON structure, you would need to unflatten it manually – a separate, non‑trivial operation.

The tool also cannot restore structure it never saw, or combine multiple JSON root objects into one table. If the file is not valid JSON at all, the tool shows the error “This JSON is invalid or not table‑shaped.” and you must fix the syntax first.

Client‑Side Processing and Privacy

This conversion runs entirely in your browser. No JSON data is uploaded to any server. Your browser parses the file, processes the data in memory, and writes the converted output on your device. Once you close the page or refresh, nothing remains.

This architecture has several practical consequences:

  • No data leaves your machine – critical for privacy‑sensitive workflows (e.g., medical records, financial data, internal APIs).
  • File size is limited by the tool’s own guardrails. A file over 8 MB is rejected with the error “This file is too large. Use a file under {max}.” Similarly, if the resulting table has more than 10,000 rows or 200 columns, the error “This table has more than {max} rows.” or “This table has more than {max} columns.” is shown.
  • Large conversions may time out. If the conversion runs past about 12 seconds, the tool stops it with “This conversion is taking too long. Try a smaller file.”
  • No network dependency. You can use the tool offline, as long as the page is loaded initially.

The client‑side approach also means that file validation is immediate. If you start a conversion with no file selected, or drop a file type the tool does not support, you see errors like “Choose one file first.” or “Choose a CSV, JSON or XLSX file.” All processing is deterministic and reproducible.

Inspecting JSON for Tabular Shape

Before you upload a JSON file, you can quickly check what the tool will do with it. The cleanest input is a single array at the top level, where each element is either an object or an array. If the elements are objects, they should ideally have the same keys for best results – otherwise some rows will have missing cells. If it’s an array of arrays, all inner arrays should have the same length. A single object also converts – it becomes a one-row table – and any array element that is not an object lands in a column named value.

Common sources of table‑shaped JSON:

  • API responses that return a collection of records, e.g., GET /users returning [{ "id": 1, "name": "Alice" },...].
  • Log files exported as JSON lines ([{"event": "login"}, {"event": "logout"}]).
  • Flat file exports from databases.

JSON that will trigger the error:

  • Text that is not valid JSON at all – a trailing comma, single‑quoted strings, unquoted keys, or an unclosed bracket. The tool cannot parse such a file, so run it through a JSON validator first.
  • “JSON Lines” files, with many independent objects on separate lines – combine them into a single array before converting.

If the table you want sits several levels deep in a nested JSON (e.g., {"data": {"users": [...]}}), the conversion succeeds but flattens everything into one row, with the whole array stringified into a single data.users cell. Extract the [...] part and pass it as the input instead.

The tool does not perform any structural inference – it converts whatever valid JSON it receives. If you get the “not table‑shaped” error, the file could not be parsed as JSON at all.

Common Pitfalls and How to Avoid Them

Leading zeros vanish on numbers

If you need to preserve a string that looks like a number but has a leading zero (e.g., US ZIP code 02139), ensure your JSON stores it as a string: "02139" not 02139. The tool will then output 02139 in the CSV. If it’s already a numeric literal, the JSON parser already discarded the zero.

Embedded commas, quotes, and newlines

CSV quoting handles these, but your downstream tool may still misparse if you use a comma delimiter and a field contains a quoted comma plus a newline. Always preview the table before downloading. If your data contains many commas, consider semicolon or tab.

Round‑tripping loss

Converting CSV back to JSON is not the inverse of this tool. A round‑trip (JSON → CSV → JSON) will not recover the original nested structure, types, or null handling. The CSV will represent flattened dot‑path columns, all values as strings, and empty cells instead of nulls. Plan your data pipeline accordingly.

Mixed object structures

If your JSON array has objects with different sets of keys, the CSV will have a column for every distinct key across all objects. This can produce a very wide table with many empty cells. Consider normalising the JSON before conversion.

File encoding

The tool reads the file as UTF-8 (the standard for modern JSON/CSV). If your CSV downstream tool expects a different encoding (e.g., Windows‑1252 for older Excel versions), you may need to re‑encode after download. The tool does not offer encoding options.

Multiple files or wrong file type

The tool works on one file at a time – there is no batch mode. If you start the conversion with no file selected, you see “Choose one file first.” If you drop an unsupported file type such as an image or a PDF, you see “Choose a CSV, JSON or XLSX file.”

FAQ

Why does my number lose its leading zero after conversion?
JSON numbers cannot have leading zeros. If your source value is "0123" (a string), it stays as 0123. If it’s 0123 as a numeric literal, JSON parsers treat it as the number 123, and the tool outputs 123. Store such values as strings in JSON if you need the zero.

Can I convert a deeply nested JSON object?
Yes. Nested objects inside each array element are flattened with dot‑path notation (e.g., a.b.c), and a single top‑level object converts to a one‑row table. If the table you need sits deep inside a larger structure, extract that array first – otherwise it lands in a single cell as JSON text.

What happens if my JSON has a single object instead of an array?
It converts to a single-row table: each top-level key becomes a column. Wrapping the object in an array ([{...}]) produces the same result.

Why does my CSV output have quotes around some values?
CSV quoting is mandatory when a field contains the delimiter, a double‑quote, or a line break. The tool applies RFC 4180 quoting automatically. Double quotes inside a value are doubled (e.g., He said "Hello" becomes "He said ""Hello""").

Does the tool support very large JSON files?
The limit is 8 MB; larger files are rejected with “This file is too large. Use a file under {max}.” Tables are also capped at 10,000 rows and 200 columns, and a conversion that runs past about 12 seconds is stopped with “This conversion is taking too long. Try a smaller file.”

Is my data safe when using this tool?
Yes. All processing happens in your browser. No data is uploaded anywhere. You can verify by watching the network tab – there should be no outbound requests during conversion.