CSVlens

CSV to JSON converter

FREE
Converted in your browser. Exports and customer data stay on your machine.

Files too large to paste

Open a file takes a CSV straight from disk. Anything under a megabyte lands in the box and behaves exactly as pasting does. Above that it is streamed: read in pieces, parsed as the pieces arrive, converted a row at a time and written to a file you download. Nothing ever holds the whole thing as one string, which is the difference between converting a 40 MB export and locking up the tab.

A 38 MB file of 900,000 rows takes a couple of seconds here, and the page stays usable throughout — there is a running row count, a preview of the first rows as they are read, and a Stop that hands back everything read so far as a complete, valid file rather than a truncated one.

The output is byte-for-byte what the same content would produce if pasted. That is not a hope: the conversion is written once and used by both paths, and the two are compared against each other on every shape.

JSON going the other way is not streamed, and cannot usefully be: a JSON document has to be parsed as a whole before anything in it means anything. The tool says so rather than showing a progress bar that could never finish.

Why splitting on commas is not enough

CSV allows a field to be wrapped in double quotes, and a quoted field may contain the delimiter, line breaks, and escaped quotes written as two double quotes in a row. So this is a single, valid two-field row:

"Smith, Ada","She said ""hello"" and left"

Any converter written as line.split(',') mangles that — and it is extremely common in exported data, because names and addresses contain commas. This parser follows RFC 4180, so quoted fields, embedded newlines and doubled quotes all round-trip correctly.

Delimiter detection

Auto-detect counts candidate delimiters outside quoted regions in the first few lines and picks the one that yields a consistent column count. That handles the usual surprise of European exports, where the list separator is a semicolon because the comma is the decimal mark. Override it if the guess is wrong.

Going the other way

JSON → CSV expects an array of objects. Keys are collected across every row, so objects with differing shapes still produce a complete header, with missing values left empty. Nested objects and arrays are serialised as JSON inside the cell, since CSV has no way to express structure.

in-browser

This tool runs entirely in your browser. Nothing you type, paste or open is sent to util.quest or anywhere else — there is no upload and no request to make one. You can disconnect from the network and it will keep working.

Convert CSV to JSON, Markdown, SQL, TSV or XML and back, with proper handling of quoted fields, embedded commas and newlines inside values — the cases that break naive split-on-comma converters. Open a file straight from disk: large exports are streamed rather than pasted, so a 40 MB CSV converts in seconds instead of locking up the tab.

It's one of the free tools in the util.quest collection — nothing to install, and no account needed. Found a bug or want a feature? Reach out at [email protected].