MASK

Free — no sign-up

CSV to JSON Converter

Convert between CSV and JSON, including the awkward quoted fields.

Runs entirely in your browser. Nothing you enter is sent to MASK.

Both directions run here in your browser.

Quoted values may contain commas, doubled quotation marks and line breaks. 0 of 1,000,000 characters.

On: each row becomes an object keyed by the first row. Off: each row becomes an array.

Questions

My CSV has commas inside the values. Will that break it?
No. A value wrapped in quotation marks may contain commas, quotation marks (written as two in a row) and even line breaks, and this converter reads all three correctly — it walks the file character by character rather than splitting on commas, which is what makes an address field like "Doe, John" stay one value instead of becoming two.
What happens to a row with the wrong number of columns?
It is kept, not dropped. A row with fewer values than the header gets empty strings for the columns it is missing; a row with more keeps the extra values under generated column_N keys. Either way the converter tells you how many rows it had to do this for, so you can go and look.
Why did a value starting with = get an apostrophe in front of it?
Because spreadsheets treat a cell beginning with =, +, - or @ as a formula to run, not as text — which is how a CSV can carry something unpleasant into Excel or Google Sheets. The apostrophe marks it as text. Plain negative numbers are left alone, and you can switch the behaviour off if the file is not headed for a spreadsheet.
Does my data get uploaded anywhere?
No. The conversion runs in your browser on this page. There is no upload and nothing is stored — closing the tab is all the cleanup there is.
What about Windows line endings and BOMs?
A byte-order mark at the start is removed, and CR LF, CR and LF line endings are all understood, including inside quoted values. Output is written with LF line endings.