CSV to JSON
Convert delimiter-separated text into a pretty-printed JSON array. Handles quoted fields, escaped quotes, and CRLF or LF line endings. The delimiter can be sniffed automatically, and numbers, booleans, and null can be inferred. Runs on your device.
🔒 100% Client-Side & Private — processed locally in your browser. Files never leave your device.
Options
Your result will appear here
Type or paste your input above, adjust the options, then press Run. Tip: press Ctrl+Enter to run, and ? for every shortcut.
How it works
What comes out
Paste delimiter-separated text and you get a pretty-printed JSON array of objects, one per data row, keyed by the header names. With the header toggle off, the first row is treated as data and columns are keyed col1, col2 and so on, sized to the widest row. The output is ordinary JSON you can drop into an API request or a script.
Real CSV rules are handled
The parser follows RFC 4180: fields may be wrapped in double quotes, a doubled "" inside a quoted field becomes one literal quote, and quoted fields can contain the delimiter and newlines. Both CRLF and LF line endings, and a single trailing newline, are handled without producing a phantom empty row. An unterminated quote is reported as an error rather than swallowed.
Options that change the result
Delimiter chooses comma, semicolon, tab or pipe, or Auto-detect, which scans the first line and picks whichever separator appears most often (commas break ties). “First row is a header” decides whether row one labels the keys. Trim strips whitespace around fields. Infer numbers, booleans and null decides whether text like 42, true or null becomes a JSON number, boolean or null instead of a string.
Caveats and privacy
Type inference only converts a number when it round-trips exactly, so a value like 007 stays the string “007” and leading zeros survive. Widely ragged rows are padded with empty values rather than rejected. Everything runs in the page — the text is parsed locally with no upload and no network call, and the same result is produced offline.
Questions
How does auto-detection work?
The first line is scanned for commas, semicolons, tabs, and pipes; whichever appears most often wins, with commas breaking ties.
What keys are used without a header?
Columns are named col1, col2, and so on, based on the widest row.
How are quotes handled?
Fields may be wrapped in double quotes; a doubled "" inside a quoted field becomes a literal quote, per RFC 4180.
Will a number like 007 lose its leading zero?
No. A value is only converted to a JSON number when the number round-trips back to exactly the same text, so 007 stays the string "007".
Related tools
See categoryJSON to CSV
Turn a JSON array of objects into CSV, with delimiter, header, and flatten options.
YAML to JSON
Convert YAML to JSON locally, with indent choice and optional key sorting.
JSON to YAML
Convert JSON to YAML on your device, with a 2- or 4-space indent.
.env <-> JSON
Parse a .env file into JSON, or turn a JSON object into .env text. Runs entirely on your device.