Data tools

JSON ↔ CSV Converter

Convert JSON and CSV in either direction, then copy or download the result.

Back to Tooldam

EXAMPLE

Try an example

Load the JSON example, convert it to CSV, and save the file. Switch to CSV → JSON and load the saved file, or use the CSV example below to convert the same data back.

Product JSON · convert to CSV
[{"sku":"0012","price":1200,"active":true,"details":{"size":"A5"}},{"sku":"0042","price":0,"active":false,"note":"Gift, boxed"}]
Product CSV · convert to JSON
sku,price,active,details,note
0012,1200,true,"{""size"":""A5""}",
0042,0,false,,"Gift, boxed"

EXAMPLE RESULTS

Product data round-trip results

The table shows results from the sample files and settings. Output and file size can vary with the input and selected options.

Load a sample above to try the same settings yourself.

SampleSettingResultChange / size
Product data round-trip exampleJSON → CSV → JSON2 data rows · 5 columnsSKU keeps leading zeros · prices, booleans and nested object become strings
Browse example files

Guide

Move developer data and table data into the format you need

Convert JSON from an API into CSV for spreadsheet review, or turn CSV tables into JSON for code and data workflows. Open a file or paste content directly, then copy or download the result.

How to use

  1. Choose JSON → CSV or CSV → JSON.
  2. Select a file or paste the source data, then run the conversion.
  3. Review the result and copy it or download the JSON or CSV file.

Nested JSON objects and arrays are preserved as JSON strings inside individual CSV cells. When converting CSV to JSON, cell values are kept as strings by default.

When is JSON useful, and when is CSV useful?

JSON can represent nested objects and arrays, which makes it common for web APIs and application configuration. CSV uses a simple row-and-column table that is convenient to inspect and edit in spreadsheet software such as Excel or Google Sheets.

JSON structure matters when converting to CSV

CSV is a flat table, so JSON whose top level can naturally be represented as rows converts most cleanly. Nested objects or arrays are stored as JSON strings inside cells so the nested value is not silently discarded.

Why CSV headers matter when converting to JSON

The first CSV row becomes the property names of the generated JSON objects. Empty or repeated headers can cause ambiguous keys, so the converter adjusts unusable names. Review the generated key names after conversion.

Numbers and dates may still appear as strings

CSV does not carry a standard data type for each cell. To avoid guessing incorrectly, CSV → JSON keeps cell values as strings. Convert values to numbers, dates or booleans later when your application knows the intended type.

What changes, and what stays the same?

JSON ↔ CSV changes data representation between nested JSON structures and row-and-column CSV tables. A clean round trip works best when the data is naturally tabular.

How is this different from a similar tool?

Use JSON Formatter when you only need to clean or minify JSON, and use CSV tools for sorting or deduplicating CSV rows. Use JSON ↔ CSV when the format itself must change.

What to check if the result is not what you expected

Deeply nested objects or arrays do not always map cleanly to flat columns. When converting CSV to JSON, the header row becomes key names, so check for empty or duplicate headers.

When this tool is useful

Useful for developers and analysts who need to inspect API JSON in a spreadsheet or send CSV table data to a system that expects JSON. The goal is moving the same data between tools with different representations.

Convert product JSON to a CSV with two data rows and five columns

The two products share the sku, price and active keys. Only the first product has details, and only the second has note.

  • Load the JSON example and click Convert to CSV. The header reads sku,price,active,details,note. The result shows 2 data rows and 5 columns.
  • The first row has an empty note cell and the second has an empty details cell. Quotes keep Gift, boxed in a single note cell.
  • Download the CSV, switch to CSV → JSON, and load the saved file. You can also load the page’s CSV example to check the same data.

Check the value types after converting back to JSON

Click Convert to JSON to get two objects. The first sku is "0012", with its leading zeros intact. The price and active values are now the strings "1200" and "true".

The first product’s details contains the JSON representation of the nested object as a string. Empty cells become empty strings in the first product’s note and the second product’s details. Convert values to the required types in the system that will use them for calculations or true-or-false tests.

FAQ

Frequently asked questions

Can nested JSON be converted to CSV?

Yes. Nested objects and arrays are preserved as JSON strings inside individual cells rather than automatically expanded into many columns.

Does a CSV need a header row?

For CSV → JSON, the first row is used as property names. Clear, unique headers produce more useful JSON keys.

Can I change JSON indentation?

Yes. For CSV → JSON, choose 2-space or 4-space indentation.

Where is the conversion performed?

Conversion and result-file creation are handled in your current browser.