Free developer tool

JSON to CSV Converter

Paste a JSON array of objects to get CSV rows with a header, or paste CSV to get JSON. Quotes and commas inside values are handled correctly.

What is json to csv converter?

JSON is the format of APIs, and CSV is the format of spreadsheets. Moving data between them is a daily task for analysts, marketers and developers.

This converter builds the header from all keys it finds, quotes values that contain commas or line breaks and turns nested values into JSON text. It also goes the other way, from CSV to a JSON array.

How to use the json to csv converter

  1. Pick the direction.
  2. Paste your data.
  3. Press Convert and copy the result, then save it as a .csv or .json file.

How the json to csv converter works

For JSON to CSV, the keys of every object are collected into a header row and each object becomes a row. Values with commas, quotes or line breaks are wrapped in double quotes with quotes doubled. For CSV to JSON, the first row becomes the keys and each later row becomes an object.

Worked example

Two objects with name, city and age become a header row and two data rows. A value like Leeds, UK is quoted so the comma does not split the column.

Common uses of the json to csv converter

  • Exporting API data to a spreadsheet.
  • Importing CSV data into an app that wants JSON.
  • Preparing sample data for tests.
  • Cleaning exports from tools.
  • Sharing data with people who prefer Excel.

Tips and common mistakes

Flat arrays of objects convert best. Deeply nested data may need flattening first.

CSV has no types, so numbers become text when you convert back to JSON.

Background: what to know before you rely on it

CSV looks simple but has quirks. The standard rules, written down in RFC 4180, say that fields with commas, quotes or line breaks must be wrapped in double quotes, and a quote inside a field is written as two quotes. Different tools use different separators, such as semicolons in many European locales, and different encodings, which causes broken accents when a file opens in a spreadsheet. JSON, by contrast, has types and nesting. Converting nested JSON to a flat table means choosing how to flatten it, for example by joining keys with dots. For large datasets, use a script or a data tool instead of a browser page.

Private, free and fast

This tool runs entirely in your browser. What you type or choose is not uploaded to a server and is not saved after you close the page, which keeps it fast and private. It is free to use as often as you like. See more in all developer tools, or browse the full list of tools.

Frequently asked questions

How do I convert JSON to CSV?

Paste a JSON array of objects and press Convert. The keys become the header.

What if objects have different keys?

The header includes every key. Missing values stay empty.

Does it handle commas and quotes?

Yes, it follows standard CSV quoting.

Is my data uploaded?

No.

Related tools

Results are for information and education. For legal, financial, medical or security decisions, check with a qualified professional. Do not paste live secrets into any website.