Skip to JSON and CSV converter
Edwin Lab

JSON ↔ CSV Converter

Turn API records into a CSV table, or turn a CSV file into JSON records.

Prefixes risky text cells and headers with an apostrophe.

JSON must be an array of objects. Nested values are rejected by default.

Formatting follows the selected delimiter. CSV import always treats cells as strings.

Ready. Choose a direction and enter data.

Convert JSON records or CSV tables

JSON to CSV accepts an array of objects and builds a header from keys in first-seen order across all records. Missing fields, null, and empty strings become empty cells, so CSV cannot distinguish those values. Choose whether nested values should fail clearly or be serialized as JSON inside one cell.

CSV to JSON treats the first row as headers and every cell as a string. An ID such as 00123 keeps its leading zeroes; true, 1e3, and large numbers are not converted to other types. Nested data is not reconstructed automatically when converting back.

Delimiters, quotes, and line breaks

Comma, semicolon, and tab delimiters use the same quoting rules: fields containing the selected delimiter, quotes, or line breaks are surrounded with double quotes, and quotes inside a field are doubled. This converter also accepts LF and CRLF rows and keeps newlines inside quoted cells.

Semicolon and tab output are delimiter variants with CSV-style quoting; they are not claimed to match RFC 4180 exactly.

Spreadsheet formula option

Escape spreadsheet formulas is on by default. It prefixes text cells and headers beginning with =, +, -, @, tab, CR/LF, or whitespace followed by a formula prefix with an apostrophe before normal CSV quoting. Numeric JSON values remain numeric text; a string such as "-1" is escaped. Turning the option off preserves cell text and shows a warning. This reduces formula risk but is not universal protection in every spreadsheet application, and the modified export may not round-trip identically.

Frequently asked questions

How are nested objects handled?

They are rejected by default. Choose Serialize as JSON text to put a nested object or array in one CSV cell. CSV-to-JSON reads that cell back as a string; it does not restore nested structure automatically.

Why are CSV numbers imported as strings?

CSV has no reliable type metadata. Keeping every cell as a string preserves leading zeroes and exact numeric-looking IDs.

How are commas and line breaks escaped?

Cells containing a delimiter, quote, CR, or LF are quoted; embedded double quotes are doubled. Line breaks inside quoted cells stay inside that value.

What does Escape spreadsheet formulas do?

It adds an apostrophe before risky text values and headers before CSV quoting. This reduces formula interpretation risk but cannot guarantee behavior in all spreadsheet software.

Related developer tools

Validate JSON with JSONLint, convert configuration with the JSON to YAML converter, or browse Developer Tools.