Skip to main content

CSV to JSON Converter — Free, In-Browser, RFC 4180

Paste CSV and get a clean, pretty-printed JSON array of objects — one object per row, keyed by the header. Quoted commas, doubled-quote escapes, and embedded newlines are parsed correctly, with auto-detected delimiters and optional type inference. Free, no signup, and 100% client-side.

RFC 4180 Correctness

Quoted commas, escaped quotes ("" → "), and newlines inside quoted fields are parsed exactly to spec — the edge cases that corrupt naive split-on-comma converters.

Auto-Detect Delimiter

Leave it on Auto and the parser scans the first row to pick comma, semicolon, tab, or pipe. Override it any time to force a specific delimiter.

Smart Type Inference

Opt in to turn "123" → 123, "true" → true, and empty cells → null. Leading-zero IDs and 19-digit numbers stay strings, so nothing rounds or loses a zero.

Header & Trim Options

Treat row one as keys or generate col_1, col_2 names. Trim surrounding whitespace on every value so " Alex " becomes "Alex" without touching quoted spaces.

Copy or Download JSON

Output is pretty-printed with two-space indentation. Copy it to the clipboard or download a ready-to-use .json file in one click.

100% Client-Side

Parsing runs entirely in your browser. Your CSV — HR exports, financials, analytics dumps — never touches a server, and the tool works offline once loaded.

CSV to JSON Converter: turn spreadsheet rows into a JSON array of objects

A CSV to JSON converter reads comma-separated rows and outputs a JSON array of objects, one object per row, keyed by the header. Paste your CSV, pick a delimiter (or let it auto-detect), and choose whether to trim values and infer types. It correctly parses RFC 4180 quoted commas, doubled-quote escapes, and newlines inside cells. The result is pretty-printed JSON you can copy or download — free, no signup, and 100% in your browser.

How to convert CSV to JSON

  1. Paste your CSV into the CSV Input box, or load the built-in sample to see the expected shape.
  2. Pick a delimiter — or leave it on Auto-detect to let the parser choose comma, semicolon, tab, or pipe.
  3. Keep Header Row on to key each object by column name; turn it off to get generic col_1, col_2 keys.
  4. Toggle Trim Values to strip surrounding whitespace, so " Alex " becomes "Alex".
  5. Toggle Infer Types to turn "123"123 and "true"true; leave it off to keep every value a string.
  6. Read the live JSON Output, then Copy it or Download a .json file.

How CSV maps to JSON, and what the spec says

CSV is a flat, row-and-column text format defined by RFC 4180, which registers the text/csv MIME type. JSON is a hierarchical key-value format defined by RFC 8259 / ECMA-404. Converting CSV to JSON means turning each data row into one object: the header cells become the keys, and that row's cells become the values. The whole file becomes an array of those objects.

The escaping rules are where conversions break. RFC 4180 says any field containing a comma, double quote, or line break must be wrapped in double quotes, and a literal double quote inside that field is escaped by doubling it. This parser implements both rules exactly, so "Park, Min" stays one value and "She said ""hi""" decodes to She said "hi". A newline inside quotes stays part of the value instead of starting a new row.

"Fields containing line breaks (CRLF), double quotes, and commas should be enclosed in double-quotes."— RFC 4180, §2, rule 6

Need to go the other way, or compare formats first? Use the reverse JSON to CSV converter, the bidirectional CSV ↔ JSON converter, or read the deep dive in our how to convert CSV to JSON guide.

Worked examples: CSV → JSON

Basic row · header on · infer types on

id,name,active
1,Alex Rivera,true

[{ "id": 1, "name": "Alex Rivera", "active": true }]

Comma inside a quoted field

id,name
3,"Sara Khan, US"

[{ "id": 3, "name": "Sara Khan, US" }] — one value, not two

Newline inside a quoted cell

id,note
5,"line one
line two"

[{ "id": 5, "note": "line one\\nline two" }] — still one row

Edge case · leading-zero ID & big integer

With infer types on, 01730 is kept as the string "01730" (a coerced number would drop the leading zero), and a 19-digit ID like 1234567890123456789 also stays a string because it exceeds Number.isSafeInteger (253-1 = 9007199254740991). Snowflake IDs, ZIP codes, and phone numbers survive intact. Turn infer types off to guarantee strings for every field.

Type inference reference

With Infer Types enabled, this is exactly how each CSV string is coerced. Anything not matching a rule below stays a string verbatim.

CSV valueJSON outputRule
123123Safe integer (≤ 253-1)
3.143.14Decimal number
true / True / TRUEtrueBoolean (3 casings)
null / NULL / (empty)nullNull or empty cell
01730"01730"Leading zero → stays string
1234567890123456789"1234567890123456789"Exceeds safe integer → string

Three behaviors most CSV-to-JSON converters get wrong

1. Empty trailing cells become empty strings, not dropped keys. If a row is shorter than the header — say 5,"Dana Lopez",intern, with a missing joined — that key is still emitted, as ""(or null with infer types on). Every object keeps the same shape, so downstream code never hits an undefined key.

2. A quote mid-field is treated literally. RFC 4180 only gives a double quote special meaning at the start of a field. So 5" pipe in a cell is read as the literal text 5" pipe, not a malformed quoted field — matching how Excel handles stray quotes, so your data round-trips instead of erroring.

3. Auto-detect ignores quoted delimiters. When counting candidate delimiters in the first row, this parser skips any that sit inside quotes. A header like name,"city;region",age is correctly read as comma-delimited, not semicolon-delimited — the ; inside the quoted cell does not fool the detector.

Runs 100% in your browser

Your data never leaves your device. Every step — delimiter detection, parsing, trimming, type inference, and the JSON download — runs locally in JavaScript, so the tool is safe for HR exports, financial reports, and other PII, and works offline once the page loads. I tested it against the built-in sample (a quoted comma, a doubled quote, an embedded newline, and an empty trailing cell) plus 19-digit IDs and leading-zero ZIP codes, across comma, semicolon, tab, and pipe delimiters with infer types on and off. The output stayed correct in every case.

Frequently asked questions

Is this CSV to JSON converter free?

Yes — 100% free with no signup and no usage cap. Convert as many CSV files to JSON as you like.

Does it run in my browser?

Yes. Conversion runs entirely in your browser, so your CSV never touches a server. It also works offline after the page loads.

What if my CSV uses tabs or semicolons?

Leave the delimiter on Auto-detect and it picks the right one, or choose Tab for TSV and Semicolon for European-locale exports. All RFC 4180 quoting rules still apply.

Will large integer IDs lose precision?

No. Type inference only coerces numbers within Number.isSafeInteger (253-1). A 19-digit snowflake ID stays a string, avoiding silent rounding.

How do I convert JSON back to CSV?

Use the reverse JSON to CSV converter, or the bidirectional CSV ↔ JSON converter.

Last updated: June 2, 2026 · Runs 100% in your browser — no uploads, nothing leaves your device.

Need a different tool?

Browse all 89 free, in-browser tools — or tell us what we should build next.

Browse all tools