Convert a comma-separated table into a JSON array, or turn flat JSON objects into CSV. The first CSV row supplies the field names. Quoted commas, escaped double quotes and line breaks inside quoted cells are preserved. Values remain text by default, so an ID such as 001 stays 001.
lightbulb When to use this tool
- check_circle Prepare a spreadsheet export for an API fixture while keeping postal codes and product IDs intact.
- check_circle Check a CSV with addresses, quotation marks or multiline notes before importing it.
- check_circle Export a small array of flat JSON records into a spreadsheet-compatible table.
Inputs and results
Input: Comma-delimited CSV with unique, non-empty column headers, or a JSON object/array of flat objects.
Output: A formatted JSON array or a CSV table, ready to copy or download.
Why use our tool?
Keep identifiers intact
String-preserving conversion avoids silently changing zero-padded identifiers.
Catch malformed records
Malformed rows, duplicate headers and unclosed quotes produce an error instead of silently dropping data.
Choose output types
Type conversion is an explicit choice; numbers and booleans are not inferred by default.
How it works
Choose CSV to JSON or JSON to CSV, then paste input, upload a file, or load the Sample.
For CSV, use the first row for unique column names. Put cells containing commas or line breaks in double quotes; write an embedded quote as two double quotes.
Leave type conversion unchecked to preserve all CSV values as strings. Enable it only when numeric and true/false values should become JSON types.
Review the result or error. Fix the input if a record has the wrong number of cells, then copy or download the converted data.
Examples
science Keep a zero-padded ID and a quoted comma
CSV input: id,name followed by 001,"Ada, A.". The JSON row is {"id":"001","name":"Ada, A."}. The comma inside the quoted name does not create another column.
science Choose types deliberately
With age,active followed by 30,true, the default result is {"age":"30","active":"true"}. Enabling type conversion produces {"age":30,"active":true}. Zero-padded values such as 001 and integers beyond JavaScript's safe integer range remain strings.
science Use a quoted multiline note
For a note spanning two lines, surround the entire cell with double quotes. The converter preserves the line break as a newline in the JSON string rather than creating a new record.
Limitations
Only comma-delimited CSV is supported; export TSV or semicolon-separated data as CSV first. Header whitespace is trimmed. Every record must match the header's column count. JSON input must contain flat objects: nested arrays and objects need flattening first. Null and missing JSON fields become empty CSV cells, so JSON types are not preserved by a CSV round trip. Large files can exceed browser memory.
Frequently Asked Questions
Can I convert CSV with quoted commas and line breaks? expand_more
Will leading zeros disappear from IDs? expand_more
Why does a row fail conversion? expand_more
Can I convert nested JSON or a JSON array of numbers? expand_more
Processing & Privacy
Processing uses your browser rather than uploading the supplied input to a processing server. Fonts and tool libraries can make third-party network requests. Optional analytics loads after consent. See the Privacy Policy for site-wide details.