Textpire

JSON to CSV

Convert JSON arrays to CSV format for spreadsheet import.

JSON Input
Delimiter
CSV Output
CSV output will appear here…

Share This Tool

Every API Returns JSON. Stakeholders Want Spreadsheets. This Is the Bridge.

I can't count how many times I've exported data from an API or a database, opened the JSON, and immediately needed to send it to someone who wanted it in Excel. It's not a technical problem. It's a format problem. JSON is how machines talk to each other. CSV is how people talk about data. You need a conversion step, and you want it to take ten seconds, not ten minutes.

This tool takes a JSON array of objects and converts it to CSV with a header row, properly escaped values, and your choice of delimiter. Paste in, copy out. No libraries to install, no Python scripts to write, no spreadsheet formulas to wrangle.

How the Conversion Works

The input format expected is a JSON array of objects β€” the most common shape you get from REST APIs. Something like: [{"name":"Alice","role":"Engineer"},{"name":"Bob","role":"Designer"}]. The tool scans all objects to collect every unique key across the entire array, then builds a column for each key. Each object becomes a row, with empty cells for any keys that object doesn't have.

Values that contain the delimiter character, quotes, or newlines are automatically wrapped in double quotes and escaped per the RFC 4180 CSV standard. So you don't need to worry about breaking the spreadsheet with commas inside address fields or line breaks in description fields.

You can choose between comma, semicolon, tab, or pipe as the delimiter. Semicolon is the right choice if you're in a European locale where Excel defaults to semicolon-delimited CSV. Tab-separated is useful when values might contain commas and you want a cleaner separator.

Real Situations Where I Use This

Three main scenarios. First, quick API data export. You call an endpoint, you get a JSON array back, a product manager wants to see it in a spreadsheet. Paste the array here, copy the CSV, paste into Excel or Google Sheets. Done in 30 seconds.

Second, database export cleanup. Tools like Postico, TablePlus, and DBeaver let you export query results as JSON. If you want that in a spreadsheet format instead, run it through here first.

Third, making API responses shareable. Developers and analysts often need to share data with people who don't have database access. Converting to CSV lets you share something non-technical people can actually open and filter without installing anything.

If you need to go the other direction and convert CSV to JSON, the CSV to JSON converter does that. And if you need to format or validate raw JSON before converting it, run it through the JSON Formatter first.

Nested JSON

Nested objects and arrays are converted to their string representation in the cell β€” so a nested object becomes the JSON string of that object. If your data has deep nesting and you need it properly flattened, you'll want to preprocess the JSON to flatten it first. For simple one-level nesting, the string representation is usually good enough to read and filter in a spreadsheet.

Frequently Asked Questions

What JSON structure does the converter expect?

It expects a JSON array of objects: [{key:value}, {key:value}, ...]. A single object (not wrapped in an array) is also accepted and treated as a one-row CSV. Arrays of primitives like strings or numbers are not supported β€” each element needs to be an object.

How are values with commas or quotes handled?

Values containing the delimiter, double quotes, or newlines are automatically wrapped in double quotes and any internal double quotes are escaped by doubling them β€” following the RFC 4180 CSV standard. This ensures your CSV opens correctly in Excel, Google Sheets, and any other RFC-compliant parser.

What if different objects in my array have different keys?

The converter collects all unique keys across every object in the array and creates a column for each. Objects missing a particular key will have an empty cell in that column. This handles inconsistent API responses gracefully.

Can I open the output directly in Excel?

Yes. Copy the CSV output, create a new .csv file, paste the content, and open it in Excel. Or paste directly into Google Sheets using File > Import or just Ctrl+V into an empty spreadsheet. For Excel on European locales, switch the delimiter to semicolon first.

Is there a size limit?

There is no enforced size limit. The conversion runs in your browser using JavaScript, so practical limits depend on your browser's memory. Large arrays of thousands of objects convert without issues on modern hardware.

Related Tools