Convert CSV to JSON
Paste a CSV, TSV or semicolon-separated export and get JSON back. The delimiter is detected automatically, quoted fields containing commas and line breaks are parsed correctly, and the first row becomes object keys unless you say otherwise. Large exports stay on your machine — nothing is uploaded.
How to use the CSV to JSON
- Paste the CSV, including its header row.
- Leave the delimiter on auto unless detection gets it wrong.
- Tick type conversion if you want numbers as numbers rather than strings.
- Copy the JSON or download it.
The CSV rules that trip people up
CSV looks trivial and is not. RFC 4180 says a field containing a comma, a double quote or a line break must be wrapped in double quotes, and a literal double quote inside a quoted field is written twice. So the row 1,"Smith, John","He said ""hi""",London is four fields, not five. A parser that splits on commas produces silent corruption on exactly the rows you care about — names, addresses, free-text notes. This tool uses a proper streaming parser, so quoted commas, escaped quotes and multi-line fields inside quotes all survive.
Delimiters in the wild
Comma is the default, but a spreadsheet exported in a locale that uses a comma as the decimal separator — much of Europe — writes semicolons instead. Tab-separated exports are common from databases and Excel "Unicode text" saves. Detection samples the first rows and picks the character that gives a consistent column count; override it if your data contains one delimiter inside quoted text far more often than the real one.
Types: strings by default
Every CSV value is text. Turning on type conversion parses numbers, true/false and empty cells into real JSON types, which is usually what you want for an import script. Be careful with two cases: identifiers with leading zeros such as UK postcodes, phone numbers and product SKUs lose the zero when read as numbers, and long numeric ids beyond 253 lose precision. Leave typing off for reference data and cast the columns you actually need afterwards.
| CSV cell | Typing off | Typing on |
|---|---|---|
42 | "42" | 42 |
007 | "007" | 7 — data lost |
true | "true" | true |
| (empty) | "" | null |
Headers and duplicate columns
With a header row, each record becomes an object keyed by column name. Two columns with the same name collide — the later one wins — so rename them in the source if that matters. Blank header cells produce empty keys, and leading spaces are trimmed by default because spreadsheet exports frequently carry them.
Encoding
A UTF-8 byte-order mark at the start of a file, which Excel adds, is stripped automatically so the first column name is not prefixed with an invisible character. If accented characters appear as mojibake such as é, the file was saved as Windows-1252; re-export it as UTF-8 rather than trying to repair it here.
Frequently asked questions
Does it handle commas inside quoted fields?
Yes. Quoting, escaped double quotes and line breaks inside quoted fields are all parsed according to RFC 4180.
Why are my numbers strings?
CSV has no types, so values are strings unless you tick the type-conversion option. Leave it off for postcodes, SKUs and long ids that would lose leading zeros or precision.
What if my file uses semicolons?
Detection usually spots it. If not, choose semicolon explicitly — it is standard in European locales where the comma is a decimal separator.
How big a file can I paste?
A few megabytes of text parses in well under a second. Everything runs in your browser, so the limit is available memory rather than an upload size.
Privacy
This tool runs entirely inside your browser using WebAssembly and the Canvas/File APIs. Your files are never uploaded to ToolFlint or any third party; you can verify this in your browser's network tab or by switching to airplane mode after the page loads. Read how we process files.
Last updated 2026-09-23.