CSV to JSON Converter
Convert CSV to JSON and back, correctly handling quoted commas, embedded newlines, escaped quotes and a leading BOM.
CSV input
JSON output
How to use this tool
- Paste CSV into the box to convert it to JSON, or paste a JSON array to convert it to CSV.
- Use the swap button to flip direction; it also carries the current output over as the next input.
- Turn on 'Infer types' if numbers and true/false should become real JSON numbers and booleans instead of strings.
- Copy the result once it looks right.
About this tool
Most CSV-to-JSON converters split every line on a comma, which corrupts the first real-world file it meets: a quoted field containing a comma reads as two columns, an escaped double quote inside a field breaks the quoting, and a field with an embedded line break splits into two rows. This one is a proper character-by-character parser rather than a split, so all of those are handled the way a spreadsheet actually writes them. Specifically handled: commas inside quoted fields, doubled "" escaped quotes inside a quoted field, a line break inside a quoted field, a leading UTF-8 byte order mark (invisible in most editors, but it silently attaches itself to the first header name if not stripped), and both CRLF and LF line endings in the same file. Type inference is a toggle rather than automatic, because it is exactly as often wrong as right: turning every numeric-looking string into a JSON number is correct for a price column and wrong for a zip code, an account number, or an ID that happens to be all digits. Leave it off to keep every value a string, or turn it on to get numbers, booleans and nulls where they clearly apply. Conversion runs both directions from the same box: paste CSV to get JSON, or paste a JSON array of objects to get CSV back, with fields needing a comma, quote or line break automatically quoted and escaped. Everything happens in your browser; nothing you paste is uploaded, which matters for data exports that carry customer or personal information.
Frequently asked questions
How do I convert a CSV file to JSON?
Paste the CSV content into the box, with 'CSV to JSON' selected. Each row becomes one JSON object, using the first row as the property names. The result appears immediately and updates as you edit the input.
Why do other CSV to JSON converters break on my file?
Almost always because they split each line on a comma character rather than actually parsing the CSV format. That corrupts any field that contains a comma inside quotes, a line break inside quotes, or an escaped double quote, all of which are valid and common in real exports from Excel, Google Sheets and most databases. This tool parses the CSV format properly instead of splitting on commas.
What does 'Infer types' actually change?
With it off, every value in the output JSON is a string, exactly as it appeared in the CSV. With it on, a value that looks like a whole or decimal number becomes a JSON number, 'true' and 'false' become JSON booleans, and an empty field becomes null. It is off by default because plenty of numeric-looking fields, zip codes, phone numbers, IDs, should stay strings.
Can I convert JSON back to CSV?
Yes. Switch the direction (or click the swap button after a conversion) and paste a JSON array of objects. The column list is the union of every key across all objects, so it handles JSON where some objects have extra or missing fields without losing any columns.
Does it handle a UTF-8 byte order mark (BOM)?
Yes. A BOM is a few invisible bytes some programs, Excel especially, add to the start of a CSV file. Left unstripped, it attaches itself to the first header's name so it no longer matches what you expect. This tool detects and removes it before parsing.
Is my data uploaded anywhere?
No. The whole conversion runs in JavaScript in your browser. Nothing you paste is transmitted, logged or stored, which matters for exports that contain customer records or other personal data.

