JSON Formatter
Pretty-print, validate and minify JSON with friendly error messages.
Convert a JSON array or object to CSV with nested objects flattened into dotted columns, ready for Excel or Sheets.
Your result is ready — download it below:
Re-encoded without size gain Download links expire within 30 minutes.
No result to display for the current input.
Convert a JSON array or object to CSV with nested objects flattened into dotted columns, ready for Excel or Sheets.
JSON is what APIs return and CSV is what people read, so something has to sit between them. Paste an array of objects and you get one row per object with a stable set of columns, ready to open in Excel, Numbers or Google Sheets. Nested objects are flattened into dotted column names, and every key found anywhere in the document becomes a column, so no field is quietly dropped.
API responses are rarely uniform. The first object may carry an id and a name, while a later one adds a status and a nested address. Taking the keys of the first object alone would silently drop everything the others have, so the tool collects the union of every key it meets, in the order the keys first appear.
Column order therefore reflects your document rather than alphabetical sorting, which usually makes the result easier to scan. A record missing a column gets an empty cell, and the number of such records is reported so an inconsistent payload does not pass unnoticed.
A nested object has no natural place in a spreadsheet, so with flattening on {"address":{"city":"Leeds","postcode":"LS1"}} produces address.city and address.postcode. The dotted path keeps the origin of the value visible, which matters once the sheet has columns from several nested objects.
Turn flattening off and the nested object is written as compact JSON inside a single cell instead. That is the better choice when the nested structure is itself meaningful, such as a list you want to open in a text editor later.
Flattening deliberately stops at lists. A list has no key to hang dotted names on, so expanding "tags":["a","b"] would invent columns such as tags.0 whose meaning depends on the order of the array. Instead the list is kept as compact JSON in one cell, which survives the round trip and can be split into columns afterwards if you actually need that.
Comma is the default, but a spreadsheet in a European locale will not split on it, so semicolon, pipe and tab are available. Pick the same delimiter the file will be opened with rather than the one that looks tidier in a text editor.
Values are written the way JSON spells them: true, false, null and numbers without quotes. That keeps the file honest as data, though a spreadsheet displaying true as TRUE is just its own rendering. Line endings default to LF, with CRLF available for older Windows tools that still expect it.
An array of objects is the common case and becomes one row per element. A single object becomes a single row. A plain list of values, such as [1,2,3], becomes a single value column, because there are no field names to invent and rows of data with no headers are still useful data.
Anything that holds no values, such as an empty array, is reported as having nothing to write rather than producing a file containing only a blank line.
No. The conversion runs entirely in your browser and the document is never sent to a server, which matters for API responses containing internal or customer data.
Their cell in that column is left empty, so every row has the same number of columns and the file stays rectangular. The number of affected records is reported in the notes.
Because it is a list rather than an object. Lists have no key to flatten onto, so the value is kept as compact JSON in one cell instead of being expanded into columns that would depend on array order.
Comma in an English locale, semicolon in most European ones. If the columns merge into a single column when you open the file, the delimiter you wrote is not the one that spreadsheet is splitting on.
JSON to CSV Converter flattens an array of objects into spreadsheet-ready rows. Columns follow the order the keys first appear, nested objects become dotted column names such as address.city, and every record is widened to the same set of columns.
How to use: paste your JSON, choose a delimiter, and press Run.
Pretty-print, validate and minify JSON with friendly error messages.
Turn any JSON into ready-to-compile Rust struct definitions with serde derives.
Turn any JSON into a TypeScript Zod schema with nullable and optional handling.
Convert any JSON into Go struct definitions with json tags and pointers for optionals.