free tool · no sign-up · runs in your browser

JSON to CSV converter

Paste a JSON array, the kind an API returns, and get a CSV with one row per object and one column per key. Keys that only some objects have still get a column. Nested objects flatten to names like address.city, so nothing is lost. Copy it as CSV, or as cells to paste straight into a spreadsheet.

paste here

result

2 rows × 4 columns

preview

2 rows × 4 columns
idnameaddress.cityplan
1AdaLagos
2Leopro

On a Mac? Skip this tab next time. Pastely does it in any app: copy, press ⌘⇧V, and it pastes in the format that app needs.

Download Pastely free

Free to embed. Put this json to csv on your blog, docs or class page.

How JSON maps to rows and columns

JSONBecomes
An array of objectsOne row per object
A single objectOne row
Each keyA column (the union of all objects' keys)
A nested object {"a": {"b": 1}}A column named a.b
A list inside a value [1, 2]The JSON text "[1,2]" in one cell
nullAn empty cell

Converting in code

In a terminal, jq handles flat arrays: jq -r '(.[0] | keys_unsorted) as $k | $k, (.[] | [.[$k[]]]) | @csv' data.json. In Python, pandas.json_normalize(data).to_csv("out.csv", index=False) flattens nested objects the same way this tool does.

JSON to CSV: questions

How are nested objects handled?+

They're flattened with dots: {"user": {"name": "Ada"}} becomes a column called user.name. A list inside a value stays as JSON text in its cell, because a CSV cell can't hold a list.

What if the objects have different keys?+

Every key that appears in any object becomes a column, in the order they first appear. Objects without that key get an empty cell.

How do I open JSON in Excel or Google Sheets?+

Paste the JSON here, choose spreadsheet cells, copy, and paste into an empty sheet. Each key becomes a column and each object a row.

Is my JSON uploaded?+

No. It's parsed in your browser, so tokens and customer data in it never leave the page.

More free tools

Paste as Plain Text

Strip fonts, colours and links from copied text, and the invisible characters too.

Remove Line Breaks

Fix text copied from a PDF: join broken lines back into paragraphs.

Case Converter

UPPER, lower, Title, Sentence, camelCase, snake_case and more in one click.

Word Counter

Words, characters, sentences, paragraphs and reading time as you type.

JSON Formatter

Format, validate and minify JSON, and fix trailing commas and single quotes.

Markdown Table Generator

Paste cells from Excel, Google Sheets or a CSV and get a Markdown, HTML or JSON table.

Remove Duplicate Lines

Dedupe, sort, trim and clean up any list in one paste.

Clipboard Viewer

See everything on your clipboard: plain text, HTML, images and hidden formats.

Mac Copy & Paste Shortcuts

Every copy, paste and screenshot shortcut on a Mac, searchable.

Paste Into Google Sheets

Turn any copied table, list or CSV into columns that paste straight into Sheets or Excel.

Table Converter

Convert tables between HTML, Markdown, CSV, TSV and JSON, in any direction.

CSV to JSON

Turn a CSV or spreadsheet into a JSON array, with numbers and true/false typed.

ChatGPT Text Formatter

Fix the asterisks and hashes when you paste ChatGPT text into WhatsApp, Slack or a plain text box.

Markdown to Rich Text

Copy Markdown as real formatting for Google Docs, Gmail, Word and Notes.

Rich Text to Markdown

Paste from Google Docs, Word or a web page and get clean Markdown.

JSON to TypeScript

Generate TypeScript interfaces from a JSON sample, optional fields included.

JSON to Swift

Generate Swift Codable structs from JSON, with CodingKeys for snake_case.

Character Counter

Count characters for X, Instagram, meta tags and SMS, including how many texts a message costs.

Sort Alphabetically

Sort any list A to Z, Z to A, by length or in natural number order.