Convert CSV to JSON — Free, Private, In-Browser
CSV to JSON is the conversion you reach for when the next thing in the chain speaks records, not tables: a REST API that wants a request body, a JavaScript app calling JSON.parse, a config loader, or a document store. CSV itself is flat, untyped text — rows and columns and nothing else. This tool reads the header row, then emits a single JSON array with one object per data row, each object keyed by its column name. So a three-column, hundred-row CSV becomes an array of a hundred flat objects. It is the shape most JS and API tooling expects out of the box, without you hand-writing a parser or a reshaping script.
The part worth watching is typing. CSV carries no types, so DuckDB sniffs each column and, where it is confident, writes real JSON values: integer and float columns become bare numbers, and true/false columns become JSON booleans. Where a column is ambiguous — mixed content, a stray "N/A", or anything that arrived quoted — it stays a string, so you may see "42" rather than 42. Empty fields are their own gotcha: DuckDB distinguishes a genuine NULL (emitted as JSON null) from an empty string (emitted as ""), and which you get depends on how the CSV was written. And because most parsers treat JSON numbers as IEEE doubles, IDs beyond 2^53 are safer left as strings.
One thing this conversion never does is invent structure. CSV is inherently flat, so every object is flat too — one key per column, no nesting and no arrays. If you need nested JSON, that shaping has to happen after this step, or upstream in whatever produced the data. Watch the size as well: a single array holds the entire result in memory and repeats every key on every record, so JSON output routinely dwarfs the source CSV. For large files or streaming ingestion, JSONL — one object per line — is usually the friendlier target. All of it runs locally in your browser via DuckDB-WASM; the CSV is never uploaded.
Drop a file or click to browse
Drop a CSV file — processed locally, never uploaded
Frequently asked questions
- Why did some numeric-looking columns come out as quoted strings?
- DuckDB only assigns a numeric type when a whole column looks numeric. A single non-numeric value — a stray "N/A", a thousands separator, a leading-zero ID, or a value that arrived quoted in the CSV — forces the column to stay text, so you get "42" instead of 42. Check the schema panel to see what type each column was given.
- Can I get nested JSON instead of flat objects?
- No. CSV has no notion of nesting, so every record comes out as a flat object with one key per column. Building nested objects or arrays has to happen after this step (or in whatever produced the CSV) — this converter won't infer structure that the source doesn't contain.
- One big array, or one object per line?
- This page emits a single JSON array, which is what most APIs and JSON.parse callers want. If you're streaming the output or feeding a log/ingestion pipeline, use the CSV to JSONL converter instead — one object per line avoids holding the whole array in memory.
- Is my file uploaded anywhere?
- No. The CSV→JSON conversion runs entirely in your browser via DuckDB-WASM. Your file never leaves your device.
- How large a file can I convert?
- It's bounded by your browser's available memory rather than any server limit — files in the hundreds of MB are routine. DuckDB runs single-threaded here, so very large files just take a little longer.
- Do I need an account?
- No — it's free and requires no sign-up.