onlinetools.dev

JSON ↔ CSV Converter

Flatten JSON to CSV, or parse CSV back into typed JSON objects

Runs locally
loading…
About this tool

Paste an array of JSON objects and get a spreadsheet-ready CSV: nested objects are flattened into dotted column names (user.address.city), columns are unioned across all rows (missing values become empty cells), and quoting follows RFC 4180 so commas, quotes and line breaks inside values survive Excel and Google Sheets.

This is the fastest path from an API response to a spreadsheet someone can filter and pivot. The column union matters with real-world data where objects are heterogeneous — row 1 may lack fields that row 40 has, and the converter handles that instead of erroring or dropping data.

The converter also runs in reverse: paste a CSV export and get a JSON array of objects keyed by the header row, with delimiter auto-detection (comma, semicolon, tab, pipe) and optional typed values — numbers, booleans and null become real JSON types. Both directions run entirely in your browser, so customer exports never leave your machine.

Frequently asked questions

How are nested objects represented?
Flattened with dot-joined keys: {"user":{"name":"Ada"}} becomes a user.name column. This keeps every scalar value addressable in one flat header row, which is what spreadsheet tools can actually work with.
What happens to arrays inside a row?
They are embedded as JSON text in a single cell (["a","b"]). Exploding arrays into columns (tags.0, tags.1…) or extra rows changes the shape of your data in opinionated ways — embedding keeps the conversion lossless and predictable.
Why does Excel show my CSV in one column?
Locale settings: in much of Europe, Excel expects semicolon-separated files because comma is the decimal separator. Switch the delimiter option to semicolon, or use Data → From Text/CSV, which lets you specify the separator.
Does the converter handle a single object (not an array)?
Yes — a lone object becomes a one-row CSV. Objects keyed by ID ({"a1":{...},"a2":{...}}) convert as one wide row, though; turn them into an array first if each value should be a row.
How does CSV → JSON handle quoted fields and embedded newlines?
Per RFC 4180: fields wrapped in double quotes may contain the delimiter, doubled quotes ("") for a literal quote, and line breaks. Excel and most databases export exactly this format, so real-world files parse correctly.
Why are my zip codes losing their leading zeros in CSV → JSON?
Typed conversion turns 02134 into the number 2134. Untick "Typed values" and every cell stays a string, exactly as written — the right choice for identifiers, phone numbers and anything with leading zeros.
Related tools