JSON to CSV Converter

Convert JSON to CSV online with RomitJSON. Transform JSON records into spreadsheet-ready rows and columns for analysis, reporting, and compatible spreadsheet applications.

Input JSON

0 characters

CSV output

Your CSV output will appear here.

Paste JSON or open a file to begin.

Convert JSON to CSV for Spreadsheets and Data Analysis

JSON is a natural format for API responses and application data, but spreadsheets work best with rows and columns. This JSON to CSV converter turns a JSON array of records or a single object into a table you can copy or download. You can choose the delimiter, decide how nested values appear, and set the column order before exporting.

Paste valid JSON or open a .json file, choose the options that fit the application you will use, and select Convert to CSV. Check the table preview and row and column counts, then copy the CSV or download it as converted.csv. Conversion happens in your browser; the JSON is not uploaded for conversion.

How to Convert JSON to CSV

  1. Paste JSON into the input box, choose Open JSON, or use the sample to see the output format.
  2. Choose a delimiter: comma, semicolon, or tab.
  3. Set whether to include a header row and flatten nested objects. Choose how arrays should appear in a cell.
  4. Optionally add a preferred column order, enable the UTF-8 BOM for Excel, or turn on spreadsheet-safe output.
  5. Select Convert to CSV. Review the preview, then copy or download the result.

The input must be valid JSON. If conversion stops with a syntax error, use the JSON Validator to locate formatting problems before trying again.

Example: Flattening Nested JSON into CSV

For an array of support tickets, each object becomes a row. With Flatten nested objects enabled, fields inside an object become columns with dotted names:

Input JSON

[
  {"id": 1042, "status": "open", "customer": {"name": "Mina Patel", "city": "Pune"}},
  {"id": 1043, "status": "closed", "customer": {"name": "Luis Chen", "city": "Austin"}}
]

CSV output

id,status,customer.name,customer.city
1042,open,Mina Patel,Pune
1043,closed,Luis Chen,Austin

This layout makes nested values easy to filter or sort in a spreadsheet. If you turn flattening off, the nested customer object is kept as JSON text inside one cell instead.

What Happens to Different JSON Values?

Arrays of objects

An array of objects is the most convenient shape for a table: each item becomes a row, and the properties found across the records become columns. If one record lacks a property that another has, the corresponding CSV cell is blank. A standalone object is treated as one data row.

Nested objects

Flattening turns nested paths into column names, such as customer.city. This is useful when you need to work with individual fields. If you need to preserve the nested structure in a cell, switch flattening off; the object is then written as JSON text. CSV cannot preserve JSON nesting as a table structure, so consider whether the destination can accept a flattened representation.

Arrays inside a record

Nested arrays stay in a single cell; they do not create extra rows or columns. Stringify each value keeps the array in JSON notation, for example ["email","phone"]. Join with ; puts its items into one semicolon-separated value. Joining is convenient for simple lists, but if an item itself contains a semicolon, the result can be ambiguous. Keep the JSON-stringified option when preserving the array boundaries matters.

Nulls, missing keys, and inconsistent records

Null values and missing properties appear as empty cells. The converter builds its headers from keys found in the records, so records with different fields still line up under one set of columns. An empty array or a structure with no exportable fields produces no CSV table.

Choose CSV Options for the Destination

Fields containing the selected delimiter, a quotation mark, or a line break are enclosed in double quotes; quotation marks inside those fields are doubled. This keeps ordinary CSV records readable by compatible importers. Still, check the preview when your destination has a strict import format.

Before You Import the CSV

CSV is a table, not a complete copy of the original JSON. It does not carry JSON types such as number, boolean, or null in a way every spreadsheet will preserve, and nested structures need to be flattened or stored as text. Spreadsheet applications may also remove leading zeros, reformat long numbers, recognize dates, or interpret formula-like values. For identifiers such as postal codes, account numbers, or IDs, import the relevant columns as text if their exact characters must remain unchanged.

For large files, the file picker accepts JSON files up to 50 MiB. Large inputs can still take time and memory to parse in a browser. If a file is too large to handle comfortably, split it into smaller records before converting.

Frequently Asked Questions

Can I convert a single JSON object to CSV?

Yes. The object becomes one data row. With the header-row option on, its property names appear in the first CSV row.

How are CSV columns chosen?

The converter collects property names across the input records. With nested-object flattening enabled, nested paths become headers such as customer.city. You can move known columns to the front with the Column order field.

Can I convert nested JSON to CSV without losing the full object?

You can keep a nested object as JSON text in a cell by turning off flattening. This preserves its contents as text, though spreadsheet software may treat the cell as a string rather than a structured object.

Will the CSV open correctly in Excel?

Excel can open or import CSV files. The UTF-8 BOM option may help some versions display non-English text correctly. During import, check encoding and set identifier columns to text to avoid unwanted reformatting.

Does the converter upload my JSON?

No. The conversion runs in your browser, and the input is not uploaded for conversion. Avoid pasting sensitive data into any page unless you are comfortable with its privacy practices; see the RomitJSON privacy information.

Why are some values surrounded by quotation marks?

A field is quoted when it contains the selected delimiter, a quotation mark, or a line break. Any quotation mark inside that field is doubled so compatible CSV readers can parse it.

Related JSON Tools

Use the JSON Formatter to make JSON easier to read, the JSON Validator to check syntax, the JSON Viewer to inspect nested data, or JSON Compare to identify differences between two documents.