What this tool does

Paste CSV (or TSV, or anything with a consistent delimiter), and get a JSON array back. The parser handles quoted fields with embedded commas, escaped quotes (""), CRLF vs LF line endings, and trailing newlines without losing rows. All parsing happens in your browser, your CSV never travels anywhere.

The output isn't just a dump. You get three different JSON shapes (objects, columns, rows), three coercion modes (none, smart, strict), automatic delimiter detection, and a live preview table that shows exactly how each cell will be typed before you copy.

How to use it

1. Paste CSV in the left pane, drop a file onto the page, or click Load file… (up to 5 MB). The Sample button drops in a small example you can poke at. 2. Pick a delimiter, Auto sniffs from the first non-empty line by counting candidate characters. If your file is unusual (e.g. caret-delimited), set it manually. 3. Toggle "Header row" if your first line is data, not headers. With it off, columns are named col1, col2, …. 4. Pick coercion: none (every value stays a string), smart (numbers, booleans, and null-likes become real types), strict (more conservative, only obvious cases coerce). 5. Pick output shape: objects (array of {header: value}), columns ({header: [values]}), or rows (raw 2D array, no header lookup). 6. Pretty wraps the output for readability. Turn it off to save bytes when piping into another tool. 7. Copy to clipboard or Download as data.json.

Output shapes

The same CSV can produce three different JSON structures depending on what you'll consume it with:

  • objects, [{"name":"Ada","role":"Analyst"}, ...]. The default. Best for general-purpose data interchange and most APIs.
  • columns, {"name":["Ada","Alan"], "role":["Analyst","Cryptographer"]}. Best for plotting libraries and dataframes. Pandas, Plotly, D3 column-mode datasets all expect this shape.
  • rows, [["Ada","Analyst"], ["Alan","Cryptographer"]]. Headers (if present) appear as the first inner array. Useful when you're piping into a tool that wants positional access.

Type coercion

CSV is a string format, every value comes out of the parser as text. The coercion modes decide whether to leave it that way or convert.

  • none, every cell is a string. Pick this when your downstream consumer does its own typing or when you have leading-zero strings (zip codes, IDs) that must stay as text.
  • smart, "42" becomes 42, "3.14" becomes 3.14, "true"/"false" become booleans, "" and "null" become null. Uses regex anchors so "00123" stays a string (no leading-zero loss).
  • strict, same as smart but only coerces unambiguous cases. Leaves edge values (e.g. "NaN", "Infinity", scientific notation) as strings.

The preview table colors each cell by its inferred type, numbers green, booleans blue, null muted, so you can spot misclassifications before you copy.

Common gotchas

  • Quoted fields with newlines. RFC 4180 allows "line one\nline two" inside a single field. The parser handles this; many naive split-on-newline parsers don't. If you've been getting weird row counts elsewhere, that's likely why.
  • BOM at the start. Some Excel exports prepend a UTF-8 BOM (). The parser strips it before sniffing the delimiter; you'll see clean output without doing anything.
  • Inconsistent column counts. If row 3 has fewer fields than row 1, the missing values come out as empty strings (which smart mode then coerces to null). The preview table makes this obvious, short rows show empty cells on the right.
  • Tabs that aren't tabs. Some "TSV" files actually use multiple spaces. Auto-sniff catches commas vs tabs vs semicolons vs pipes; for whitespace-padded data, paste into a text editor first and run a find-replace.

Privacy

CSV input, parsed output, and any recent file names you loaded stay in your browser. No file content is uploaded, the file picker reads via FileReader locally. Recent inputs are stored only in localStorage and can be cleared from the Recent card.

Frequently asked

Does this tool upload my CSV anywhere?

No. The file is read with the browser's FileReader API and parsed in JavaScript. Nothing is sent to a server, nothing is logged, nothing is persisted beyond the recent-inputs list in localStorage.

What's the difference between objects, columns, and rows output shapes?

Objects gives you [{name:'Ada',role:'Analyst'}, ...] — the default and best for most APIs. Columns gives {name:['Ada','Alan'], role:[...]} — best for charting libraries and dataframes. Rows gives a raw 2D array including the header line — useful for positional access.

How does delimiter auto-detection work?

The sniffer counts candidate characters (comma, tab, semicolon, pipe) on the first non-empty line and picks whichever appears most consistently. If your file uses something unusual, set the delimiter manually with the dropdown.

What's the difference between smart and strict coercion?

Smart converts anything that looks like a number, boolean, or null — '42' to 42, 'true' to true, '' to null. Strict only coerces unambiguous cases and leaves edge values like 'NaN', 'Infinity', or scientific notation as strings. Use none if you have leading-zero IDs that must stay as text.

Will leading zeros be preserved?

In none mode, yes — every value stays a string. In smart and strict mode, '00123' stays a string because the regex requires no leading zero before coercing to a number. Plain '123' coerces to 123.

Does the parser handle quoted fields with commas or newlines inside?

Yes. The parser implements RFC 4180 quoting: fields wrapped in double quotes can contain the delimiter, embedded newlines, and escaped quotes (written as ""). Naive split-on-comma parsers break on these — this one doesn't.

Why does my output have null values where I had blank cells?

In smart mode, empty strings coerce to null. If you'd rather keep them as empty strings, switch coercion to none, or switch to strict (which leaves blanks as ''). The preview table shows exactly how each cell will be classified before you copy.

What's the file size limit?

5 MB for file uploads. For larger datasets, paste a sample in directly (browsers handle pasting tens of megabytes fine) or split the file. The tool keeps the entire dataset in memory, so massive files can make the page sluggish.