CSV to JSON Converter

Turn CSV into a clean JSON array of objects.

Free CSV to JSON converter that parses RFC 4180 CSV — including quoted fields and embedded commas — into a tidy JSON array of objects, with optional number and boolean inference. Runs entirely in your browser — nothing is uploaded. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

Does it handle quoted fields with commas inside?

Yes. The parser follows RFC 4180, so quoted fields, escaped double quotes ("") and line breaks inside quoted values are all handled correctly.

Convert CSV to JSON in your browser

This tool turns a CSV file with a header row into a clean JSON array of objects — one object per row, keyed by the column names. It is built for developers loading spreadsheet exports into an app or API, and for anyone moving data from Excel or Google Sheets into a JSON-based system without writing a script.

How it works

The parser implements the RFC 4180 standard rather than a naive split on commas. It reads the text character by character, tracking whether it is inside a quoted field, so commas, line breaks and doubled quotes ("") inside a quoted value are preserved instead of breaking the row. The first row becomes the header; each later row is zipped against it to build an object. With “infer numbers and booleans” on, clean numeric literals become JSON numbers and the words true, false and null become their JSON equivalents — everything else stays a string.

Example

This CSV:

name,role,active
Ada,Engineer,true
"Bao, Jr.",Designer,false

becomes:

[
  { "name": "Ada", "role": "Engineer", "active": true },
  { "name": "Bao, Jr.", "role": "Designer", "active": false }
]

Note the comma inside "Bao, Jr." is kept because it is quoted.

Why not just split on commas?

A naive comma-split breaks on two very common patterns:

  1. Fields with embedded commas. An address like "123 High Street, London" split naively on commas produces three fields instead of one. The RFC 4180 parser handles this by recognising that the value is wrapped in double quotes.
  2. Fields with embedded line breaks. Multi-line descriptions in Google Sheets exports contain a literal newline inside a quoted field. A line-by-line approach breaks the row at that newline. RFC 4180-aware parsing tracks quote depth and spans multiple lines correctly.

Most CSV exported from spreadsheet tools follows RFC 4180. The main exception is whitespace handling: some tools add a space after each delimiter, and RFC 4180 does not strip it. This parser preserves whitespace inside unquoted cells, so name, role as a header becomes "name" and " role" (with a leading space). If your JSON objects have unexpected spaces in their keys, trim the header row before converting.

Type inference details

With type inference on, each cell is tested against three patterns:

  • Number: a value that parseFloat converts cleanly, with no extraneous characters. 42, -3.14, and 1e6 all convert; 007 and 1,000 do not — their leading zero and comma formatting signal that they are identifiers or locale-formatted strings, not pure numbers.
  • Boolean: the strings true and false (case-insensitive) become JSON booleans.
  • Null: the string null (case-insensitive) becomes JSON null. Empty cells become empty strings by default, not null, to avoid ambiguity.

Turn inference off if your data contains literal true/false strings that should stay as text, or if your IDs would be corrupted by numeric conversion.

Delimiter options

Beyond standard comma-separated files, the converter also handles:

  • Semicolons — common in European locales where , is the decimal separator
  • Tabs — used by TSV files, Google Sheets copy-paste, and many analytics exports
  • Pipes — occasionally used in legacy data pipelines

Set the delimiter before converting; the parser applies it consistently across all rows.

Everything runs locally in your browser — nothing is uploaded, which makes it safe for confidential spreadsheets and exports.