Runs in your browser. Your files and text never leave your device - nothing is uploaded.
Convert JSON to CSV Online
The Tools Kit’s free JSON to CSV converter turns a JSON array of objects into a comma-separated table you can open in Excel, Google Sheets or any spreadsheet app. Paste JSON from an API response, a database export or a log file, or upload a .json or .txt file, and the converter builds a header row from the object keys and writes one CSV row per object.
Everything happens in your browser with the built-in JSON parser, so the data is never uploaded to a server. There is no signup and no limit on how many times you convert. If your JSON will not parse, tidy and validate it first with the JSON formatter, which shows the parser’s error message.
How to Convert JSON to CSV
- 1
Add your JSON
Paste a JSON array of objects, such as [{"name":"Alice","age":30}], into the JSON Input box, or upload a .json or .txt file using the upload area above it.
- 2
Convert to CSV
Click Convert to CSV. An uploaded file converts automatically. The keys from every object become the header row and each object becomes one row below it.
- 3
Fix any errors
If the text is not valid JSON, an Invalid JSON message shows the parser’s explanation, such as an unexpected token, so you can correct the input and convert again.
- 4
Copy or download the CSV
Use Copy CSV to put the result on your clipboard, or Download .csv to save it as data.csv and open it in Excel, Google Sheets or another spreadsheet app.
How JSON Maps to CSV Columns and Rows
CSV is a flat table, while JSON can describe records of any shape. The converter bridges the two with a simple rule: each object in the array is a row, and each key is a column. It reads every object first, collects all of the keys in the order it first meets them, and uses that combined list as the header. Records that do not share the same fields still line up, because any key an object lacks is written as an empty cell.
For example, this JSON array:
[
{"name": "Alice", "age": 30, "city": "Austin"},
{"name": "Bob", "age": 25, "email": "bob@example.com"}
]converts to this CSV:
name,age,city,email
Alice,30,Austin,
Bob,25,,bob@example.comAlice has no email and Bob has no city, so each gets a blank cell in that column instead of the values shifting left. A single JSON object, rather than an array, is treated as one record and produces a header line plus one data row. To go the other way, the CSV to JSON converter turns a table back into an array of objects using the first row as keys.
Commas, Quotes and Nested JSON
Because commas separate the columns, a value that contains a comma, a double quote or a line break would break the table if written as-is. The converter wraps any such value in double quotes and doubles each quote inside it, the standard CSV convention that Excel and Google Sheets understand. A value of He said "hi", then left is written as "He said ""hi"", then left".
Nested data is not flattened. A nested object is written as the text [object Object], and a nested array such as ["x","y"] becomes a single quoted cell, "x,y". For deeply structured JSON, move the fields you need up to the top level of each object before converting, or keep the hierarchy with the JSON to XML converter, which preserves nesting as child elements.
Null values become empty cells, and numbers and true/false values are written as plain text. The output always uses a comma as the delimiter and one line per row.
JSON vs CSV: When to Use Each
JSON is the native format of web APIs and configuration files because it handles nested objects, lists and typed values such as numbers and booleans. CSV is the lingua franca of spreadsheets, databases and analytics tools: it is compact, readable in any text editor and imports almost everywhere, but it only describes rows and columns of text.
Convert JSON to CSV when you want to sort, filter, chart or share records with people who work in spreadsheets. Keep JSON when the structure matters or the data feeds another program. If your source data arrives as YAML or XML instead, convert it with the YAML to JSON or XML to JSON tool first, then turn the resulting array into CSV here.
Common uses
- Turning an API response that returns a list of records into a spreadsheet
- Exporting JSON data from a database or app into Excel or Google Sheets for reporting
- Lining up records that do not all have the same fields into one consistent table
- Preparing data for a CSV import into a CRM, email platform or analytics tool
- Building a documentation table: paste the CSV into the Markdown table generator to get a table for a README
- Checking what changed between two exports by comparing the CSV output side by side in Text Compare
More format tools, from units to data encodings, are collected on the conversion tools page.
JSON to CSV terms explained
| Term | What it means here |
|---|---|
| JSON | JavaScript Object Notation, a text format for structured data built from objects ({ }), arrays ([ ]), strings, numbers, true/false and null |
| CSV | Comma-separated values, a plain-text table where each line is a row and commas separate the columns |
| Array of objects | A JSON list of records, such as [{...},{...}]; the shape that maps most cleanly onto CSV rows |
| Key | The name on the left of a JSON property ("name" in "name":"Alice"); keys become CSV column headers |
| Header row | The first CSV line, listing the column names; here it is every key found across all objects |
| Escaping | Wrapping a field in double quotes, and doubling any quotes inside it, so commas or line breaks in a value do not break the table |
| Flattening | Turning nested objects into separate columns (such as address.city); this tool does not do that automatically |
Frequently Asked Questions
Paste a JSON array of objects into the JSON Input box, or upload a .json or .txt file, and click Convert to CSV. The keys become the header row, each object becomes a row, and you can copy the result or download it as data.csv.
Yes. It is free with no signup, and the conversion runs entirely in your browser using the built-in JSON parser. The JSON you paste or upload is not sent to a server.
An array of objects works best, for example [{"name":"Alice"},{"name":"Bob"}]. A single object is also accepted and becomes one data row under a header row. The input must be valid JSON, with double-quoted keys and strings and no trailing commas.
The converter collects every key it finds across all objects, in the order it first sees them, and uses that combined list as the header. An object that lacks one of those keys gets an empty cell in that column, so every row stays aligned.
No. Values are written as plain text, so a nested object appears as [object Object] and a nested array appears as its items joined by commas in a single quoted cell. Flatten nested data into top-level keys before converting if you need each nested field in its own column.
Any value containing a comma, a double quote or a line break is wrapped in double quotes, and inner double quotes are doubled, following the usual CSV convention. The value He said "hi", then left becomes "He said ""hi"", then left".
Both null and a missing key are written as an empty cell. Numbers and true/false values are written as their plain text, such as 30 or true.
Yes. Click Download .csv to save data.csv and open it in Excel, Google Sheets, Numbers or LibreOffice. The file uses commas as the separator. If accented or non-English characters look wrong in Excel, import the file with the Data > From Text/CSV option and choose UTF-8.
No. The output always uses a comma as the delimiter and a new line between rows. If you need a semicolon or tab, use your spreadsheet’s import options or a find-and-replace on the downloaded file.
The input could not be parsed as JSON. Common causes are trailing commas, single quotes instead of double quotes, unquoted keys, comments, or a missing closing bracket. The text after Invalid JSON is the parser’s own message pointing at the problem.
Reviewed by Raja Jahangir · Last reviewed: October 7, 2026
How do you convert JSON to CSV?
To convert JSON to CSV, paste an array of objects and each object becomes a row, with every key found across the objects forming the header and blank cells filling missing fields. Values containing commas, quotes or line breaks are quoted and escaped automatically. Nested objects are not flattened, so move nested fields to the top level before converting.
