CSV to JSON Converter (and JSON to CSV)

Convert CSV to a JSON array or JSON back to CSV — with delimiter and header controls.

Ad placeholder (leaderboard)
Enjoying the tools? Go Pro for £4.99 (one-time) and remove all ads — forever, on this device. Remove ads — £4.99

A fast, two-way converter between CSV and JSON that runs entirely in your browser. Paste a spreadsheet export and get a clean JSON array of objects, or paste a JSON array and flatten it back into delimited CSV rows. It is built for developers wiring up APIs, analysts moving data between tools, and anyone who needs to reshape a file without installing a script or trusting a remote upload box. Both directions update live as you type, and you can copy the result to the clipboard or download it as a .json or .csv file.

How it works

When converting CSV to JSON, the first row is read as the column header by default, and each subsequent row becomes one object whose keys are those column names. With type coercion enabled, values that look like numbers or booleans are converted to real JSON numbers and true/false rather than being left as quoted strings — so 1, true and 82000 come out correctly typed. You can trim surrounding whitespace, skip blank lines, and choose whether the output is pretty-printed or minified.

When converting JSON to CSV, the tool scans every object in the array and builds a stable, ordered union of all keys it finds. That means objects with different or missing fields still line up into the same columns, with empty cells where a key is absent. Nested objects and arrays are serialised to compact JSON strings so they survive the round trip instead of collapsing into [object Object]. You can pick the output delimiter (comma, semicolon, tab or pipe), choose whether to emit a header row, and force every field to be quoted for maximum compatibility with strict importers. Under the hood the converter uses a robust, RFC 4180-compliant CSV engine, so quoted fields containing commas, the delimiter character, escaped quotes or embedded line breaks are all parsed and written correctly. A handy Swap button feeds the current output back into the input box so you can re-export in a different delimiter or verify a round trip in one click.

Example

Starting from this CSV with a header row and the comma delimiter:

id,name,active,salary 1,Ada Lovelace,true,82000

You get a JSON array where each row is an object — id and salary as numbers, active as a real boolean, and name as a string:

[ { "id": 1, "name": "Ada Lovelace", "active": true, "salary": 82000 } ]

Switch to JSON to CSV with the same data and you get the original rows back, optionally with a different delimiter or every field quoted. Convert a comma file to tab-separated values, or a semicolon export from a European spreadsheet into a standard comma CSV, all in a single step.

Everything happens locally in your browser — no numbers, names or files are ever uploaded.

Ad placeholder (rectangle)