TXT · Text & Data tools

CSV to JSON Converter

Input · CSV
Output · JSON
0 Bin0 Bout0lines in0rowsEmptyCSV
Go to the full Data Format Converter

CSV to JSON

Convert CSV rows to a JSON array of objects. Paste CSV on the left; the JSON output builds on the right as you type.

id,name,role
1,Ada Lovelace,engineer
2,Grace Hopper,engineer

becomes

[
  { "id": 1, "name": "Ada Lovelace", "role": "engineer" },
  { "id": 2, "name": "Grace Hopper", "role": "engineer" }
]

The header row supplies the keys, and each remaining row becomes one object. id converts to the number 1 rather than the string "1" because Coerce types is on by default.

Type coercion

A cell that reads exactly 42, true, false, or null converts to that JSON type when Coerce types is checked. Anything else, including a value with leading zeros like 007 or a phone number, stays a string, since guessing wrong there is worse than leaving it as text. Turn Coerce types off to keep every cell as a string exactly as written.

Delimiter detection

Auto-detect samples the first rows of your input and scores comma, semicolon, tab, and pipe by how consistent the resulting column count is. It gets this right for almost any real CSV or semicolon-delimited export; set Delimiter manually only if your file mixes formats or has one dominant text column full of commas that throws off the count.

No header row

Some exports skip the header entirely. Turn off Header row and each line becomes a plain JSON array of its cell values instead of an object, so you can rename or restructure the fields yourself afterward.

Frequently Asked Questions

Each header cell becomes a key in every row's object. Turn off Header row if your CSV has no header; rows then convert to arrays of values instead of objects.

Check that Coerce types is on. With it enabled, a cell reading 42 becomes the number 42, true or false becomes a boolean, and an empty cell in a coerced column becomes an empty string, null, or is left out depending on how it appears in the source.

Auto (the default) scores comma, semicolon, tab, and pipe against the first rows of your file and picks whichever produces the most consistent column count. Set Delimiter explicitly if your file is ambiguous, such as free text containing many commas.

It's read correctly as one field. Standard CSV quoting, a field wrapped in double quotes with internal quotes doubled, is handled the same way most spreadsheet software writes it.

No, not automatically. Each column becomes a flat key on the object; reversing dotted names like address.city back into nested objects isn't part of this converter.

Jump straight to a conversion

Full Data Format Converter tool

Explore Our Tools

Browse all tools