CSV vs JSON: Conversion Examples and Data Types
Convert a CSV table to JSON and back while checking headers, quoted cells, leading zeros, and nested data.
Choose a table or a structured document
CSV suits rectangular rows with shared columns. JSON can also represent nested objects, arrays, and typed values. CSV does not declare whether a cell is a number, a boolean, or an identifier.
In CSV, quote fields containing commas, quotes, or line breaks; double a quote inside a quoted field. This example keeps a comma inside one note cell.
name,postcode,note
Ava,00123,"Maths, science"Convert without losing leading zeros
Open CSV to JSON, keep the header option enabled, and leave type inference off for the example. The postcode stays a string. Enabling inference can turn numeric-looking identifiers into numbers and discard leading zeros.
[
{"name":"Ava","postcode":"00123","note":"Maths, science"}
]Export JSON for a spreadsheet
Paste the resulting array into JSON to CSV. Choose columns and delimiter, preview the result, and download it. For nested objects, review flattened column names before export.
Spreadsheet-safe export changes formula-like text to reduce accidental formula execution. Keep it enabled for spreadsheet use, and check whether you need exact values for a machine import. CSV export is not a lossless archive of arbitrary nested JSON; retain the original document.
Reference: RFC 4180: CSV field and quoting conventions.