Convert JSON data to CSV format.
JSON to CSV Converter turns JSON data into a CSV spreadsheet, flattening nested objects and arrays into rows and columns you can open in Excel or Google Sheets. Paste your JSON and download a ready-to-use CSV file.
Made for everyone. Typical uses:
The sample records {"name":"Ada","age":36,"address":{"city":"London"}} and {"name":"Sam, Jr.","age":41,"tags":["a","b"]} give the header name,age,address.city,tags. The second row is "Sam, Jr.",41, an empty cell, and ["a","b"] as JSON text in one quoted cell.
Nested objects are flattened into columns, but arrays are not expanded: a list is written as JSON text in a single cell, so a record with several items still gives one row. Very large files depend on your browser's memory, and spreadsheet programs may reformat identifiers such as 02134 when they open the file.
Accuracy: Conversions use well-known methods and are tested with real sample inputs. Check the output before you send or publish it.
Expert Tip
If each record holds a list you want as separate rows, extract that inner array first and convert it on its own. When you open the CSV in Excel, import it through the Data menu and set ID columns to Text to keep leading zeros.
The JSON to CSV Converter takes a JSON array of objects, or a single object, and turns it into comma-separated text that spreadsheets can open. You paste the JSON or open a .json file, choose the delimiter and whether to flatten nested objects, and press Convert to CSV. The result can be copied or downloaded as data.csv. Nothing is uploaded, because the conversion runs in your browser.
The Try an example button loads two records: Ada, aged 36, living in London, and "Sam, Jr.", aged 41, with a list of tags. With the default settings the output has four columns.
With flattening on, a nested object becomes dotted columns, so {"address":{"city":"London"}} becomes the column address.city. With it off, the whole object stays in one cell as JSON text. Arrays are not expanded in either mode: a list is written as JSON text in a single cell, with its quotation marks doubled as the CSV format requires. The delimiter can be a comma, semicolon, tab or pipe. A field is quoted only when it contains the delimiter you chose, so "Sam, Jr." is quoted with commas but written as plain text when you pick a semicolon.
The output follows the RFC 4180 CSV standard. A field is wrapped in double quotes when it contains the delimiter, a quotation mark, a line break, or a space at either end, and quotation marks inside it are doubled. Missing values and null become empty cells. Numbers and true or false values are written as plain text. Rows are separated by carriage return and line feed. The downloaded file begins with a byte-order mark, which lets Excel read accented letters and other non-English characters correctly.
A flat array of similar objects converts best. A single object gives one row, and an array of plain values such as [1,2,3] gives one column named value. An empty array returns an error, and invalid JSON returns the parser message with the problem; the JSON Formatter and the guide on common JSON errors help you repair it. If each record contains a list of objects, such as an order with several items, the list stays in one cell. To get one row per item, extract the inner array first and convert that.
Double-clicking a CSV opens it in Excel, which guesses the type of each column. It may turn an identifier such as 02134 into 2134, or show a long number in scientific notation. Both changes are Excel's, not the file's. Import the file through the Data menu and set those columns to Text. In regions where Excel expects a semicolon as the separator, choose the semicolon delimiter before converting. Google Sheets reads the comma version without any extra steps.
The CSV to JSON Converter reverses the process. To check a document before converting it, run it through the JSON Validator, and to compare two versions of the same data use the JSON Diff Checker. Very large files depend on your browser's available memory.
Explore more in Converters, read the guides and articles, or see how we test our tools.
Convert CSV data to JSON format.
Best for turning a spreadsheet export into JSON for an API request
Format, beautify, and validate JSON data with proper indentation.
Best for formatting minified JSON from APIs for readability
Validate JSON syntax and check for errors.
Best for validating JSON before API deployment
Compare two JSON objects side by side.
Best for comparing two versions of an API response to spot what changed