PasteSheet icon PasteSheet logo mark — a spreadsheet grid with a curly brace on a green rounded square PasteSheet

Convert JSON to CSV

Paste a JSON array of objects and get CSV back. The header row is the union of every key across your objects, so an object missing a field produces an empty cell rather than a shifted row.

Your JSON

Nothing is stored.

How it handles ragged objects

CSV is rectangular and JSON is not, which is the whole difficulty. The header row is built from the union of every key across every object, in first-seen order. An object that is missing one of those keys gets an empty cell for it, rather than having its remaining values shift left into the wrong columns.

Values are escaped per RFC 4180: anything containing a comma, a double quote or a newline is quoted, and literal quotes are doubled. Nested objects and arrays are serialised back to compact JSON inside their cell, because a CSV cell cannot hold structure.

What the output looks like

output.csv
name,role
"Lovelace, Ada",Engineer
"Grace ""Amazing Grace"" Hopper",Admiral

Going the other way

Need the reverse? Convert CSV to JSON. And if the JSON is coming out of a spreadsheet in the first place, a PasteSheet endpoint serves it as JSON at a live URL, so you can skip the export-and-convert round trip entirely.

Frequently asked questions

What if my objects have different keys?

The header row is the union of every key across every object, in first-seen order, and an object missing a key gets an empty cell for it. That keeps the output rectangular — the alternative, using only the first object's keys, silently drops data that appears later in the array.

What happens to nested objects and arrays?

They are serialised back to compact JSON inside the cell. A CSV cell holds a string and nothing else, so there is no lossless way to flatten arbitrary structure into one — keeping it as JSON at least means nothing is thrown away.

Does it accept a single object rather than an array?

Yes. A single JSON object is treated as a one-row array, so you get a header row and one data row. Anything that is not an object or an array of objects cannot become a table, and the tool will tell you so rather than guessing.

Sources

Related tools

Turn your sheet into an API in minutes

Paste a Google Sheet URL and get a live REST API and MCP server — no backend, no code, free to start.