NinjaFunction (Ninja Function) logo

JSON to CSV Converter

Convert JSON to CSV and CSV to JSON. Flatten nested data, choose the separator, then copy or download. Free and private.


Options

Your data stays on your device. It is converted in your browser.

CSV result

About This Tool

NinjaFunction's JSON to CSV Converter changes data between JSON and CSV in both directions. Paste or open your data and see the result straight away with the number of rows and columns. Flatten nested objects into columns such as address.city, choose a comma, semicolon, tab or pipe as the separator, turn numbers and true/false into real values, and copy or download the result. Everything runs in your browser, so your data is never uploaded to a server.

🔑 How to Use

  1. Choose the direction: JSON to CSV, or CSV to JSON.
  2. Add your data. Paste it into the box, click Open file, or press Sample to see an example.
  3. Set the options. Pick the separator, and tick the options that match your data.
  4. Read the result on the right. It updates as you type, and shows the number of rows and columns.
  5. Copy or download the result, or press Use result as input to convert it back.

💡 Pro Tips

  • ✔ Check the JSON first if you see an error. A missing comma or quote is the usual cause. The JSON Formatter can find it.
  • ✔ Use Flatten when your objects contain other objects, so every value gets its own column.
  • ✔ Open the CSV in Excel with Data, then From Text/CSV, if accents look wrong.
  • ✔ Use Use result as input to check that a round trip gives back what you started with.

JSON and CSV: What Is the Difference?

JSONCSV
ShapeNested: objects inside objects and listsFlat: rows and columns, like a table
Best forAPIs, web apps and settings filesSpreadsheets, reports and database imports
Data typesText, numbers, true/false, null, listsEverything is text, and programs guess the rest
Opens inCode editors and browsersExcel, Google Sheets and any spreadsheet

When to Convert

  • JSON to CSV: to look at API data in a spreadsheet, share it with someone who does not use code, or import it into a database.
  • CSV to JSON: to feed a spreadsheet into a web app, an API or a test, or to build sample data for development.
  • Need test data? The Mock Data Generator makes fake records in both formats.

Frequently Asked Questions

How do I convert JSON to CSV?

Paste a JSON list of objects into the box, or open a .json file. The CSV appears on the right straight away. Copy it, or download it as data.csv and open it in Excel or Google Sheets.

What JSON can be converted?

The best fit is a list of objects, such as [{"id":1,"name":"Asha"},{"id":2,"name":"Ravi"}], where every object is one row. A single object becomes one row, a list of lists becomes rows without a header, and a list of plain values becomes a single column.

What happens to nested objects and lists?

With Flatten switched on, a nested object such as {"address":{"city":"Pune"}} becomes a column called address.city. Lists inside a row are kept as JSON text in one cell, because a spreadsheet cell cannot hold a real list.

Why do some cells have quotes around them?

A value that contains the separator, a quote or a line break must be wrapped in quotes, so a spreadsheet does not split it into two columns. Quotes inside a value are doubled. This is the normal CSV rule, and Excel and Google Sheets understand it.

How does CSV to JSON decide what is a number?

With Turn numbers and true/false into real values switched on, 42 and 3.14 become numbers, and true and false become booleans. Codes with leading zeros, such as 007 or 0123, stay as text, because turning them into numbers would lose the zeros. Switch the option off to keep everything as text.

My CSV uses semicolons. Will it work?

Yes. Choose Semicolon, Tab or Pipe as the separator. Many European versions of Excel save CSV files with semicolons.

Is my data uploaded to a server?

No. The conversion is done in your browser, so your data never leaves your device and nothing is stored after you close the page.

Always FreeAll tools are 100% free to use.
No Sign UpNo registration or login required.
Blazing FastInstant results, always.