Convert CSV to JSON or JSON back to CSV, keeping zip codes, IDs and quoted text exactly as written and listing anything the conversion changes.
Initializing in your browser…
Convert a CSV to an Excel .xlsx or OpenDocument .ods workbook with real number, currency, percentage and date cells, while keeping zip codes and IDs exactly as written.
Clean up CSV columns with a chain of 34 steps: trim, change case, extract digits, reformat dates and numbers, mask values and more, with a live before and after preview.
Generate realistic test data as JSON, CSV or SQL: valid card numbers and IBANs, safe example e-mails, and a seed that brings the same rows back.
A customer export holds zip codes with leading zeros, an empty phone number, a note with quotes inside it, and a yes/no column. It needs to become JSON for an API that expects numbers and booleans where they make sense.
CSV
id,name,zip,phone,note,active 1,Alice Johnson,07030,+1 201 555 0143,"Prefers ""morning"" calls",true 2,Bob Smith,00501,,"Widget, large",false
JSON (array of objects, default settings)
[
{
"id": 1,
"name": "Alice Johnson",
"zip": "07030",
"phone": "+1 201 555 0143",
"note": "Prefers \"morning\" calls",
"active": true
},
{
"id": 2,
"name": "Bob Smith",
"zip": "00501",
"phone": "",
"note": "Widget, large",
"active": false
}
]The ids become numbers because 1 and 2 read back exactly, and true/false become booleans. The zip codes stay strings, since the number 7030 would lose the leading zero. The doubled quotes in the note are the CSV way of writing a quote, so the JSON holds the words with real quote marks, and the comma inside "Widget, large" stays part of the value. The empty phone number is an empty string rather than null, and no notes appear because nothing was changed in a way that cannot be undone.
Turn a CSV file into JSON for an API, a script or a config file, or turn a JSON array back into a CSV for a spreadsheet. Numbers and true/false values are typed only when that is safe, so 07030 stays "07030" and a 20-digit order number is not rounded, and every value the conversion cannot carry exactly is listed above the result.
Typing that does not damage your data. Every field in a CSV file is text, while JSON has numbers, booleans and null. A careless converter turns the zip code 07030 into the number 7030, the product code 1e5 into 100000 and a long account number into a rounded approximation. By default this tool converts a value to a number or a boolean only when writing it back out gives exactly the same text, so 42 becomes 42 and true becomes true, while 007, 0.10 and 1e5 stay strings. If you want everything as text, choose Everything is a string. If the values are quantities and leading zeros do not matter, choose Numbers, even when they do not read back, and each value that changed is counted with an example.
Five output shapes. Array of objects, one object per row, is what most code expects. You can also wrap that array in an object with a count, index the rows by a column such as an ID, transpose the table into one array per column (handy for charting libraries), or write plain arrays of values with no column names at all. When rows are indexed by a column, a repeated or empty key is reported instead of silently replacing an earlier row.
Headers and odd rows. A JSON object cannot hold two members with the same name, so a duplicated header is renamed, for example to name (2), and the rename is shown. Rows with more fields than the header still convert, with the extras in numbered columns. Headers such as address.city can optionally become nested objects; a column that cannot be nested without losing a value, for instance when both address and address.city exist, stays flat and is explained.
JSON to CSV. Drop or paste a JSON array and the direction switches automatically. The CSV gets one column for every key found in any object, in the order keys first appear, so a field only some records have is still kept. Nested objects become columns like address.city, and lists are written into the cell as JSON text. The downloaded CSV uses CRLF line endings, quotes only fields that need it, and starts with a UTF-8 byte order mark so Excel shows accented names correctly.
Details that matter. Spaces inside fields are kept unless you turn on trimming, because RFC 4180 treats them as part of the value. Quotes inside a field arrive in the JSON intact. Empty cells stay empty strings unless you ask for null, and you can map words such as NULL or N/A to null under More options. The file is read and converted in your browser, so nothing is uploaded.
Export a product list or user table from a spreadsheet and get an array of objects ready to POST, with prices as numbers and SKUs with leading zeros still intact.
Paste a JSON response, switch to JSON to CSV, and download a file where nested fields become their own columns and nothing that appears in only some records is missed.
Keep test data in a spreadsheet that non-developers can edit, then convert to keyed JSON indexed by an ID column for a script to read.
Choose One array per column to get { "month": [...], "sales": [...] }, the layout many charting libraries take directly.
A customer list with 07030 and 00501 in the zip column converts with those values as strings. The id column, holding 1, 2, 3, becomes numbers, and true/false becomes JSON booleans.
Converting [{"a":1,"b":2},{"a":3,"c":4}] to CSV gives the columns a, b and c, with empty cells where a record has no value.
With Numbers, even when they do not read back, the cells 007 and 1e3 become 7 and 1000, and the notes list both so you can see exactly what changed.
Not by default. A value becomes a number only if writing that number back produces the same text, and 7 is not 007. Choose Numbers, even when they do not read back if you want the conversion anyway; every changed value is then listed.
They stay strings. JSON numbers are usually read as 64-bit floating point, which holds about 15 to 17 significant digits, so a 20-digit ID would be rounded. Because the rounded number does not read back as the original text, the default setting keeps it as text.
Yes. Under More options, turn on Empty cells become null, or choose which words, such as NULL, N/A or None, should become null. Converting back to CSV writes null as an empty cell, so the notes count how many cells this affected.
The second one is renamed, for example to email (2), and the note above the result says so. A JSON object cannot have two keys with the same name, and renaming keeps both columns' values.
Nested objects become columns joined with a dot, such as address.city, unless you turn flattening off. Arrays, and objects when flattening is off, are written into the cell as JSON text, and the notes list which keys this applied to.
Yes. The delimiter is detected automatically, so files exported from European versions of Excel with semicolons, and tab separated files, convert the same way.
No. The conversion runs entirely in your browser. You can disconnect from the internet after the page loads and it will still work.
Rows and columns are parsed and transformed in memory in your browser. No record ever reaches a server.