CSV to JSON
Converts CSV to a JSON array, handling quoted fields, embedded commas and newlines, and a custom
delimiter. Paste CSV text or upload a .csv file.
About This Tool
Spreadsheet exports, database dumps, and log files are usually CSV, but downstream code, a script, an API payload, a test fixture, wants JSON. This parser handles quoted fields, commas and newlines embedded inside quotes, a custom delimiter, and optional type inference (numbers, booleans, and nulls become their JSON types instead of staying strings).
It needs plain delimited text, Excel/Sheets/Numbers files must be exported to CSV first. For the reverse direction, use JSON to CSV; to turn the resulting JSON into SQL instead, see JSON to SQL.
Key Features
- Bidirectional conversion: one Direction dropdown (or the ⇌ swap button) switches between CSV → JSON and JSON → CSV.
- Four delimiters: comma, semicolon, tab, or pipe, for the various dialects of "CSV" files in the wild.
- Optional header row: toggle whether the first row is treated as field names or as data.
- Type inference toggle: on by default; numeric, boolean, and null-looking cells convert to their native JSON type instead of staying strings.
- Quoted-field handling: correctly parses commas and newlines embedded inside quoted CSV fields.
- File upload: load a
.csvor.jsonfile directly instead of pasting.
Example
name,age,active Ada,30,true Grace,28,false
produces:
[
{ "name": "Ada", "age": 30, "active": true },
{ "name": "Grace", "age": 28, "active": false }
] FAQ
- Can I convert JSON back to CSV?
- Yes! Click the ⇌ swap button or toggle the Direction dropdown to convert JSON arrays back into CSV.
- Does this support Excel files?
- Export your spreadsheet to CSV first (File → Save As → CSV in Excel, Sheets, or Numbers), then paste or upload here.
- What does "infer types" do?
- When on, cells that look like a number,
true/false, ornullbecome that JSON type.