✦ tomai
Free · Developer Tools

CSV to JSON

Parse comma-separated data into clean JSON objects

CSV input
JSON output

Quoting, delimiters and type inference

  • Records split on CRLF or LF, fields on comma/semicolon/tab — the delimiter is sniffed from your first line.
  • RFC 4180 quoting is honoured: doubled quotes become literal quotes, and commas inside quotes never split a field.
  • Cells that look numeric become JSON numbers; leading-zero codes (007) stay strings so you do not lose them.

CSV has dialects; this one speaks RFC 4180

⚡

Delimiters detected for you

Comma, semicolon, tab and pipe are all auto-detected from your data, with a manual override — European and Asian exports parse without setup.

🔒

Headers become object keys

The first row turns into JSON property names automatically, and every following row becomes an object — clean output ready for code.

🎯

Numbers stay numbers

"42" becomes a number, "true" becomes a boolean, and ambiguous strings are preserved as text — the JSON stays true to your data.

Frequently asked questions

How are quoted fields handled?

Fields wrapped in double quotes may contain the delimiter, newlines and escaped quotes ("…""…") exactly as the CSV spec requires; the parser returns them as a single clean value.

Can I control the output shape?

Yes. By default the first row becomes the object keys and each following row an object. Turn that off to get an array of arrays, or edit the generated text manually before copying.

Is my CSV uploaded anywhere?

No. Everything runs in your browser with plain JavaScript — nothing you paste is transmitted or stored.

Why does my file import with a strange character in the first cell?

That is a UTF-8 BOM exported by Excel. It rides invisibly before the first header name. This tool strips it before parsing; if you pipe the JSON onward, the first key comes out clean.

Related tools

What is a CSV to JSON converter?

Comma-separated text is the most common interchange format of legacy systems, spreadsheets and bulk exports, yet modern code overwhelmingly prefers JSON. This converter bridges the two: it splits plain text into logical rows, honors quoted fields that contain delimiters or span several lines, detects commas, semicolons, tabs or pipes, and rebuilds everything as indented JSON. Take the first row as object keys for an array of records, or keep every row as data for an array of arrays, then copy the result or download it as a JSON file.

The delimiter problem, solved by counting

  • Automatic detection across the first rows, with manual override to comma, semicolon, tab or pipe
  • Quote-aware splitting that keeps embedded commas inside quoted fields and decodes doubled quotes correctly
  • Multi-line quoted values rejoined into single logical rows before conversion starts
  • First-row-as-keys mode with deterministic de-duplication of blank or repeated headers, or array-of-arrays mode for raw grids
  • Status line reporting the delimiter actually used plus the record count of the output

Spreadsheet exports it earns its keep on

  • Turning an exported contact, order or inventory sheet into API-ready JSON records
  • Loading a database dump or government CSV into JavaScript or Python without hand-splitting fields
  • Republishing legacy feeds as structured data while keeping identifiers like 007 exactly as written

When real-world files fight back

Type coercion is deliberately conservative: a value becomes a JSON number only when converting and printing it reproduces the exact original text, which is why zero-padded codes stay strings while plain integers become numbers, and only lowercase true, false and null become native values. Ragged rows with fewer fields than headers receive empty strings for the missing cells rather than shifting columns. Empty input is refused outright, since there is nothing to convert.

Privacy: rows are parsed and rebuilt inside the browser tab; pasted business data is never uploaded to any server.

Last updated · 2026-09-01

Related tools