JSON to CSVONLINE

Turn JSON records into CSV with consistent columns and optional formula protection.

1 MiB per input · Ctrl / ⌘ + Enter to run

Use an array of objects. Nested values remain JSON cells; missing fields are empty. Formula protection changes formula-like text by adding an apostrophe.

Result
Ready. Paste input, then run the tool.
Your JSON stays in your browser. Core processing happens locally.
THE PRACTICAL GUIDE

Convert JSON records to CSV without confusing cells and types

JSON to CSV maps a record or an array of records into spreadsheet-style rows. Column names come from the union of top-level keys.

When should you use it?

  • Open API records in a spreadsheet.
  • Hand tabular data to a CSV importer.
  • Compare field coverage across a small dataset.
WORKED EXAMPLE

Example: records become rows

Top-level names form the header. Spreadsheet import settings still control how cells are interpreted.

JSON input
[{"name":"Alex","score":42},{"name":"Sam","score":38}]
CSV output
name,score
Alex,42
Sam,38

Start with a table-shaped set of records

CSV has rows and columns but no object or array type. Choose records with stable field names and inspect nested values before exporting. Quotes, commas, and line breaks inside a cell require CSV quoting; a comma in a customer name should remain part of one cell. Use a CSV parser when reading the result rather than splitting every line on commas.

Know what a spreadsheet may reinterpret

CSV does not declare that an identifier is text or that a value is a date. A spreadsheet may convert 00123 into 123 or interpret formula-like text. The optional formula protection changes those cells to reduce that risk, so review it when exact text matters. Choose XLSX export when preserving supported cell types in a workbook is more useful than a plain text interchange file.

AT THE WORKBENCH

Give each record a row.

The union of top-level property names becomes the header row. Values are escaped for comma-separated CSV, with CRLF line endings and doubled quotes inside quoted cells.

  1. Provide records

    Paste a nonempty array of objects, or one object.

  2. Choose formula protection

    Keep protection enabled for spreadsheet-bound data unless you need exact text.

  3. Download the CSV

    Review the output and choose how your spreadsheet imports column types.

IN PRACTICE

How do I export JSON records to CSV with missing fields?

Provide one object or a nonempty array of objects. The converter builds a header from all top-level property names and writes one row per object. A missing property becomes an empty cell; a nested object becomes JSON text within one cell.

JSON records with a missing column

json
[
  {"name":"Alex","score":42},
  {"name":"Sam"}
]

The CSV header is name,score. Sam’s score cell is empty. This differs from an explicit JSON null, which is written as the text null.

Spreadsheet applications may interpret formula-like text. Keep formula protection enabled for untrusted text; it adds an apostrophe to qualifying strings and therefore intentionally changes those exported cells.

BEFORE YOU USE THE RESULT

What should you check before using the result?

CSV cannot preserve every JSON type or distinction, and spreadsheet apps may reinterpret cells. Choose text import for identifiers and review formula protection before sharing untrusted data.

Nested and missing values

Objects and arrays inside a record are serialized as JSON in a single cell. Missing properties become empty cells; null is written as null. This is a tabular export, not a reversible encoding of every JSON type. Spreadsheet import can also reinterpret dates and long numbers.

Spreadsheet formulas

With protection enabled, string cells and headers beginning with formula-like characters receive a leading apostrophe. This deliberately changes their text and reduces accidental formula execution. Spreadsheet behavior varies, so import untrusted CSV as text and review it. Numeric negatives remain numbers.

Learn spreadsheet conversion

Technical reference: CSV records and quoting · RFC 4180

THE JSON FIELD GUIDE
All guides