Convert JSON to CSV JavaScript Object Notation ↔ Comma-Separated Values Free Online Secure
Drop your JSON file in and take away CSV. It is read and written here, in your browser, so the file never leaves your device — and what the crossing keeps, and what it cannot, is written out below rather than left for you to discover.
Convert your file
Drop your JSON file here, or choose one.
Your file never leaves this device. Everything runs in your browser.
Nothing uploaded
Convert from JSON
Convert to JSON
Where these formats come from
CSV is the oldest and the least standardised: a table written as lines of text, in use since the 1970s and only described in writing in 2005, by which time every program had already decided for itself what the separator was and when to put quotation marks. XML grew out of SGML in 1998 for documents that must carry strict structure and be checked against a schema. JSON was pulled out of JavaScript by Douglas Crockford around 2001, deliberately stripped down to objects, arrays, numbers and strings — and that minimalism is why it took over the web. YAML is its readable cousin, where indentation does the work that brackets do elsewhere. The one thing that matters when converting between them: CSV is flat, a grid of rows and columns, while JSON, XML and YAML are trees.
Where you meet them
CSV is what a spreadsheet exports and what an accountant, a shop platform or a bank statement will hand you. JSON is what web services speak and what configuration files are increasingly written in. XML survives in older enterprise systems, in invoicing standards and inside the office formats themselves. YAML is where humans write settings by hand. Converting between them is the daily work of moving data from where it was produced to where it is needed.
Questions people ask
My CSV opened as one column in Excel. Why?
Because your spreadsheet expected a different separator. Excel follows the list separator of the computer's regional settings, which is a semicolon anywhere the comma is already the decimal mark — that is, most of continental Europe. A file separated by commas then looks like a single column of text. Use the import dialogue and state the separator explicitly, rather than double-clicking the file. The same regional setting is why 3.5 sometimes arrives as a date.
Why can't my nested JSON become a tidy spreadsheet?
Because a spreadsheet is flat and JSON is a tree. A row can hold one value per column; a JSON object can hold a list inside a field inside another list. Converting means choosing how to flatten that: either joining nested names into one long column heading, or repeating the parent row once for each child. Both are compromises, and neither can be undone automatically — which is why going back from the spreadsheet to the original shape usually needs a human decision.
Does the file lose quality?
It depends on what the two formats can hold. Converting between formats that store the same thing — a PNG to a BMP, a WAV to a FLAC — loses nothing. Converting into a format that throws information away to save space, such as JPEG or MP3, loses a little every time, and converting back does not bring it back. Where a choice exists, this page errs towards keeping the original quality rather than making the smallest file.
Is my file uploaded anywhere?
No. The conversion happens inside your browser, on your own machine; the file never leaves it and there is no server here that could receive it. That is why a large file is limited by your own memory rather than by an upload, and why nothing you convert can appear in anybody's logs — including ours. The audio and video tools do fetch their conversion engine from this site the first time you use them, some thirty megabytes once; after that the work still happens entirely on your machine.
Why people convert JSON to CSV
JSON is the language that programs use to talk to each other. An export from a web service, the answer of an API, a configuration saved by an application, a dump from a database: most of it arrives as JSON. It is wonderful for software and awkward for people, because a screenful of brackets, quotes and commas is not something you can sort, filter or add up. CSV is the opposite: a plain table, one row to a line, cells separated by commas, which opens in every spreadsheet on earth. That is why people convert JSON to CSV: they have data that a program produced and they want to look at it, count it or hand it to someone who lives in a spreadsheet.
The situations are familiar. An analyst who has pulled records from an API and wants a pivot table. A shop owner who has exported orders from an online platform and needs them in Excel. A researcher with the results of a survey saved by a tool. A developer who wants to check a few hundred records at a glance. In every case the data is already structured, and what is missing is only the table.
This page converts JSON to CSV in your browser. Your file is read and written here, so it never leaves your device, which matters for customer lists, orders and anything else personal. And the page tells you in advance what the crossing keeps and what it cannot, rather than leaving you to discover it. Below you will find how the conversion works, which kind of JSON can become a table and what happens to the rest.
How the conversion works
Keys become the header, in the order they first appear
Your JSON file is read inside your browser. The keys of the records become the header row of the CSV, in the order they first appear. Each record then becomes a row, and each value is written as it stands. If you look at the first line of the result, you see the names of the fields; below them, one line for each record.
A missing key leaves an empty cell
Records are not always uniform. One may lack a field that the others have. In that case a row missing a key leaves an empty cell rather than shifting the columns along. The column stays where it belongs, and the cell is simply empty, so the table stays aligned.
Every row and every column
Nothing is dropped. Every record becomes a row and every key that appears anywhere becomes a column. You do not need to worry that a field that appears only in the thousandth record will be left out.
What is kept
All the rows and all the columns
Every row and every column is kept. The data you gave is the data you get, in table form.
The values as they stand
Each value is written as it stands. Numbers remain numbers, text remains text, and values that contain commas or quotation marks are quoted correctly so that the spreadsheet reads them as one cell.
The order of the fields
The columns follow the order in which the keys first appeared, which is normally the order the program that produced the file used. That keeps the table familiar to anyone who has seen the data in its original form.
What you should know before you convert JSON to CSV
Only one JSON shape is already a table
Only one JSON shape is already a table: an array of flat objects, such as a list of records, each with the same kind of fields. A single object, or a tree with objects inside objects, has no rows to write and is refused rather than flattened into something you did not ask for. This is a deliberate choice. Flattening a tree involves decisions about names and about which branches to keep, and a wrong guess would produce a table that looks right and is not.
Nested values are written as JSON text
Where one value is itself a list or an object, it is written into the cell as JSON text, because a cell cannot hold a branch. So a record with a field for tags, holding a list, will show that list as text in one cell. It is all there, and you can split it with the tools of your spreadsheet if you wish.
CSV has no types
A CSV file is text. Whether 007 is a number or a code is for the spreadsheet to decide when it opens the file, and spreadsheets are famous for guessing wrongly. Leading zeros, long numbers and dates can be changed on opening. If this matters, import the file using the import dialogue and mark such columns as text.
How to convert JSON to CSV here
Add your file
Drop the JSON file onto the page or pick it from your device. It is read inside your browser and is not uploaded.
Convert
Press the button. A file of ordinary size takes a moment. Leave the page open until it is done.
Download and open
Download the CSV and open it in your spreadsheet program, or in a text editor to look at it. Check the header, a few rows in the middle and the last row.
A closer look at JSON and CSV
Trees and tables
JSON describes a tree: objects containing values, which may be objects or lists in turn. CSV describes a table: rows and columns, nothing more. A tree can hold things that a table cannot, such as a branch with different branches under it. A table that is a list of uniform records, on the other hand, can be written in JSON without any loss. To convert JSON to CSV is to go from the general form to the special one, and it works smoothly when the data was really a table all along.
Why the strictness helps
Tools that accept any JSON and flatten it automatically often invent column names such as address.street or items.0.price. This is convenient until you need to know what happened. By accepting only the shape that is already a table, this page spares you from silent decisions. If your file is a tree, you know it at once.
Commas, quotes and line breaks
CSV has its own traps: a comma inside a value, a quotation mark, a line break in the middle of a cell. They are handled by quoting the cell and doubling the quotes inside it, so the spreadsheet reads the table the way it was meant.
Common situations in detail
Exports from web services and APIs
Most services return lists of records as JSON. If you need them in a spreadsheet, convert JSON to CSV and open the result. It is the quickest route from an API answer to a pivot table.
Orders, customers and products
Shop platforms often let you export data as JSON. A CSV of orders or products can be sorted by date, filtered by customer or totalled by product in a few clicks.
Survey results and logs
Tools that store survey answers or event logs as JSON produce one record per answer or event. As a CSV, they can be counted, charted and compared.
Checking data at a glance
Developers often convert a few hundred records to CSV just to read them. A table is easier to scan than nested braces, and a spreadsheet can sort and highlight the odd ones out.
Practical advice before you convert JSON to CSV
Check the shape of your file
Open the JSON in a text editor. If it starts with a square bracket and holds a list of curly-braced records with simple values, it is the right shape. If it starts with a curly brace and has records nested inside, look for the list you need and extract it first.
Know which values are nested
If some fields contain lists or objects, they will appear as JSON text in their cells. Decide whether you need them split, and plan to do it in the spreadsheet.
Mind the encoding and the separator
The CSV is written with commas. Some spreadsheets in some regions expect semicolons. If a file opens as a single column, use the import function and set the separator.
Large files
Everything runs on your device, so a very large file needs memory. For files of many megabytes, use a computer, and split the data if the page struggles.
Questions people ask before converting
Why was my file refused?
Because it is not an array of flat objects. A single object, or a tree with objects inside objects, has no rows to write. Pick out the list you need and convert that.
What happens to a record that lacks a field?
It leaves an empty cell in that column. The columns do not shift.
What happens to lists inside a record?
They are written into the cell as JSON text, because a cell cannot hold a branch.
Why do my leading zeros disappear in the spreadsheet?
Because the spreadsheet decided the column was numeric when it opened the file. The CSV holds the zeros; use the import dialogue and mark the column as text.
Is my file uploaded?
No. The conversion runs in your browser and the file never leaves your device.
Can I go back to JSON?
Yes. CSV to JSON turns a table back into a list of records.
Choosing wisely when you convert JSON to CSV
CSV or a real spreadsheet?
If you want a file that opens in Excel with a proper sheet, JSON to XLSX writes the same table as a workbook. CSV is lighter and more universal; XLSX opens without any import step.
Other targets
If the destination is a configuration or a markup file, JSON to XML and JSON to YAML serve those needs.
Keep the JSON
The JSON is the master. It holds the structure and the types. Keep it, and treat the CSV as a view of the data.
Getting a good result after the conversion
Import, do not just open
When a file contains codes, phone numbers or dates, use the import dialogue of your spreadsheet and set the type of each column. It avoids the quiet damage that automatic guessing can cause.
Check a few rows against the source
Compare a couple of records in the table with the JSON. It takes a minute and tells you the table is faithful.
Split nested cells when needed
If a cell holds a list as text, use the text-to-columns tool or a formula to split it. Or go back and prepare the JSON so that each item has a record of its own.
Preparing your JSON so that it converts well
Shape the data before you convert JSON to CSV
If your file is a tree, you can usually reshape it into a list of flat records before you convert JSON to CSV. Pick the list that holds what you want to count: the orders, the customers, the events. Copy it into a file of its own, with the square brackets around it, and the page will accept it. This small step is the difference between a refusal and a clean table.
Keep the field names meaningful
The keys become the header, so the clearer the names, the more readable the table. If you control the source, use names such as order_date and customer_name in place of abbreviations that only a programmer would understand.
Be consistent about types
A field that holds numbers in most records and text in a few will confuse a spreadsheet. If you can, clean the odd ones before the conversion, so that each column means one thing.
Think about dates
Dates in JSON are usually text in some agreed format. They are written to the CSV as they stand. After you convert JSON to CSV, tell the spreadsheet how to read them when you import, and it will treat them as dates and let you sort and filter by time.
Test on a small piece first
If your file is large, copy the first twenty records into a test file and convert that. A quick look at the result shows whether the shape and the field names are what you expect, before you spend time on the whole thing.
Privacy and handling
Why local conversion matters for data
Data files often hold what is private: customers, orders, addresses, messages. Many online converters upload your file to a server, process it and send back the result, and for a while a copy lives on a machine you do not control. Here your own browser does the work, so the data stays on your device.
What happens when you leave
When you close the page, the converted file disappears from the browser, so download it first. Nothing about your data is kept.
If something goes wrong
The page says the file is not valid JSON
There may be a stray comma, a missing quote or a bracket that does not close. Open the file in an editor that highlights JSON errors and fix the line it points to.
The columns look scrambled
Your spreadsheet may expect a different separator. Import the file and set the separator to a comma.
The page freezes with a large file
Everything runs on your device, and a large file needs memory. Try again on a computer, or split the data.
Related tools
The same family of tools covers the neighbouring jobs. To go back, use CSV to JSON. For a workbook, JSON to XLSX and XLSX to JSON work with Excel files. For other formats of structured data, there are JSON to XML, XML to JSON, JSON to YAML and YAML to JSON. When the figures are in a PDF, PDF to XLS rebuilds a table from the page.
A worked example
Say you have exported 500 orders from an online shop as a JSON file, and you want to know which products sell best. You drop the file here and press the button. A moment later you download a CSV with a header of the field names and 500 rows beneath it. You import it into your spreadsheet, mark the product code as text, make a pivot table and see the answer. The JSON stays in your folder as the source.
A short checklist
Before converting
Check that the file is a list of records. Note which fields are nested. Keep the JSON.
While converting
Stay on the page until the file is ready.
After converting
Import the CSV with the right types, check a few rows against the source and save the table in your spreadsheet format.
Common mistakes
Feeding it a tree
Do not expect to convert JSON to CSV for a deeply nested file. Extract the list of records first.
Opening by double-click and trusting the result
Spreadsheets guess types. Import with explicit types for codes and dates.
Deleting the JSON
Keep it. It holds the structure the table cannot.
Your data stays on your device
The conversion happens locally. Your file is read by your own browser, rewritten there and handed back as a CSV. Nothing is uploaded, so no copy ends up on a server and nobody else can read it. For data with private content, that is the safe way to convert JSON to CSV.
Summary
To convert JSON to CSV here, drop the file and press the button. It is read and written in your browser, so the file never leaves your device. Every row and every column is kept: the keys become the header, in the order they first appear, and each value is written as it stands. A row missing a key leaves an empty cell rather than shifting the columns along. Only one JSON shape is already a table, an array of flat objects. A single object, or a tree with objects inside objects, has no rows to write and is refused rather than flattened into something you did not ask for. Where one value is itself a list or an object, it is written into the cell as JSON text, because a cell cannot hold a branch.