Data tools · Browser calculation
CSV to JSON Converter
Turn a CSV table into a JSON array without losing leading zeros or long identifiers. Quoted commas, escaped quotes, and multiline fields are supported.
How to convert CSV to JSON
- Paste a header row and records. Select comma, semicolon, or tab; the delimiter is not guessed.
- Leave number conversion off to preserve identifiers and original text.
- Convert, review the column preview and any error or warning, then copy or download the JSON array.
The conversion code runs in your browser and does not upload the pasted content. Site analytics and feedback have separate behavior: see the privacy policy. Do not paste credentials or private customer records.
Worked example: keep a leading-zero identifier
id,note
00123,"Hello, world"
With the default string-preserving setting, this produces:
[
{
"id": "00123",
"note": "Hello, world"
}
]
What CSV syntax is supported?
The parser follows the common quoting conventions described in RFC 4180: surround a field containing a comma or line break with double quotes, and write a literal double quote as two double quotes. It accepts a leading UTF-8 BOM character and CRLF, LF, or CR record endings, and retains line breaks inside quoted fields. Browser textareas can normalize pasted CRLF line breaks to LF, so the original line-ending bytes are not guaranteed. Semicolon and tab are explicit delimiter options.
- Quoted comma:
"Hello, world"is one field. - Escaped quote:
"She said ""hello""."becomesShe said "hello". - Multiline field: a newline inside a quoted field remains inside that string.
- Empty values:
1,,is three fields; empty cells stay"". - Leading zeros and long IDs:
00123and9007199254740993123remain exact strings by default. - Unicode: text such as
東京andCaféis retained.
Errors are reported instead of silently repaired
Every record must have the same field count as the header. Duplicate or blank headers, an unclosed quote, a quote in an unquoted field, or extra characters after a closing quote produce an error. Spaces are meaningful: headers are not trimmed, and name and name are different keys. Blank internal lines are not silently discarded. A header-only file produces an empty array with a note.
Optional number conversion: when should I use it?
Use the optional checkbox only for actual quantities. It converts canonical safe integers and simple decimals with at most 15 significant digits when their plain text representation is retained. Leading zeros, long IDs, exponent notation, trailing decimal zeros, surrounding spaces, and negative zero stay strings. Booleans, dates, and empty cells are not inferred. JavaScript numbers have finite precision; see the safe integer limit. Decimal numbers still use binary floating point, so keep financial or exact decimal data as text.
Limits and next steps
This is a bounded single-table converter: up to 10,000 data records, 200 columns, 100,000 total cells including headers, 100,000 characters per field, 1,000,000 input characters, and 4,000,000 output characters. Some combinations hit a smaller limit first. It does not read spreadsheet workbooks, merge files, repair malformed CSV, save mappings, or run scheduled imports.
Will a round trip preserve every type?
No. CSV has no built-in types. The default preserves cell text, not a previous distinction between JSON null, missing values, numbers, and strings. When converting back to a spreadsheet, quoted CSV fields may still be interpreted as numbers or formulas.