Developer Tools

CSV to JSON Converter

Paste CSV with a header row and get a clean JSON array of objects — quoted fields respected, numbers and booleans typed automatically.

100% browser-side processing — nothing is uploaded

CSV → JSON: Map CSV rows into typed JSON objects. Output updates live as you type — or press Ctrl/Cmd + Enter.

Results update live as you type.
4 lines · 0.06 KB
1 lines · 0.00 KB

Related tools

How to convert CSV to JSON

  • Paste CSV

    Include the header row — it becomes the JSON keys. Export from Excel or Sheets with File → Download → CSV.

  • Convert

    Each data row becomes an object. Numeric strings become numbers, true/false become booleans, null becomes null.

  • Use the JSON

    Copy or download the array, or chain another action — format it, or unflatten dot-notation headers into nested objects.

Type inference: helpful, with one honest caveat

CSV stores everything as text, so the converter infers types: "42" becomes the number 42, "true" and "false" become booleans, "null" becomes null, and anything else stays a string. This is almost always what you want — but note that identifier-like values that happen to be numeric, such as ZIP codes with leading zeros ("02139") or long order IDs, will be parsed as numbers and can lose their leading zero. If a column must stay textual, quote the values in the source or post-edit the JSON output.

Quoting, commas, and multi-line cells

The parser implements the RFC 4180 rules real spreadsheet exports follow: fields wrapped in double quotes may contain commas and even line breaks, and a doubled quote inside a quoted field is a literal quote character. Empty rows are skipped, and a blank header cell is auto-named column_1, column_2, and so on rather than producing an empty key. If your headers use dot notation — user.name, user.address.city — convert first and then run Unflatten in the studio to rebuild the full nested structure.

CSV to JSON Converter FAQ

Is the header row required?

Yes. The first row supplies the JSON keys for every object. Without it there is nothing to name the fields — add a header row before converting.

How are numbers and booleans handled?

Values that parse as numbers become JSON numbers, true/false become booleans, and null becomes null. Everything else remains a string.

My ZIP codes lost their leading zeros — why?

Type inference parsed them as numbers. Wrap those values in quotes in the source CSV, or fix the affected fields in the JSON output, to keep them as strings.

Can cells contain commas or line breaks?

Yes, if the cell is quoted — standard spreadsheet exports do this automatically. The parser follows RFC 4180, including doubled quotes for literal quote characters.

Can I get nested JSON out of flat CSV?

Use dot-notation headers (user.name, user.city), convert here, then run the Unflatten action in the JSON Tools Studio to rebuild the nesting.