Skip to content

Convert CSV to JSON online

Turn CSV or TSV into clean JSON with auto-detected delimiters, type inference, nested keys and pretty printing. Free, private, no upload.

  • Runs in your browser
  • Files are never uploaded
  • Free, no account
Conversion options
Everything runs on this device — the file is never uploaded.

Auto-detect inspects the first few rows.

Use row 1 as the JSON keys.

Turn 42, true and empty cells into numbers, booleans and null.

profile.city becomes a nested { profile: { city } } object.

Strip spaces around every value before converting.

CSV input

JSON output

How to convert a CSV file to JSON

  1. Load your data. Paste the CSV into the left pane, or drag a .csv, .tsv or .txt file onto it. Everything is parsed in this browser tab.
  2. Check the delimiter. Auto-detect inspects the first rows and picks the separator that yields a consistent column count. Override it if your file uses something unusual.
  3. Decide how the keys are built. Leave “First row is a header” on to use row 1 as the JSON keys, or switch it off to get generated column_1, column_2 names.
  4. Choose the output shape. An array of objects suits most APIs; column arrays suit plotting libraries; arrays of arrays keep the raw grid.
  5. Copy or download. The JSON updates as you type. Use Copy for a quick paste, or Download for a .json file.

Type inference: what changes and what does not

CSV has no types — every cell is text. Turning on Infer value types upgrades cells that are unambiguous, and deliberately leaves alone the ones that are not. That distinction is where most converters quietly corrupt data.

CSV cell JSON value Why
42 42 Plain integer, safely representable
3.14 3.14 Decimal number
007 "007" Leading zeros are meaningful — usually a code, not a number
4916338506082832 "4916338506082832" Over 15 digits: JavaScript numbers would lose the last digits
true true Boolean literal (also TRUE and True)
(empty) null Missing value rather than an empty string
2026-08-16 "2026-08-16" JSON has no date type; ISO text round-trips everywhere

Building nested JSON from flat columns

Spreadsheets are flat, APIs are not. With Expand dotted keys enabled, a header path is turned back into structure: a column called profile.city becomes a nested object, and a numeric segment becomes an array index.

id,name,profile.city,tags.0,tags.1
1,Ada,London,analysis,mathematics

becomes

[
  {
    "id": 1,
    "name": "Ada",
    "profile": { "city": "London" },
    "tags": ["analysis", "mathematics"]
  }
]

Quoting, embedded commas and line breaks

The parser follows RFC 4180. A field wrapped in double quotes may contain the delimiter, newlines and escaped quotes written as "". So 1,"Doe, Jane","She said ""hi""" parses to three fields, the last containing She said "hi". Rows with a different number of fields than the header are still converted, and each one is listed as a warning so you can spot a malformed export instead of silently importing it.

Why do this in the browser?

CSV exports are usually the most sensitive files an organisation has: payroll runs, customer lists, transaction logs. Every server-side converter asks you to upload exactly that. Here the file is read with the FileReader API, parsed by Papa Parse, and rendered — all inside the tab. There is no upload endpoint to leak, no retention policy to read, and no file size limit beyond your own memory. Load the page once and it keeps working with the network switched off.

Questions

Does my CSV get uploaded anywhere?

No. The file is parsed by JavaScript running in this tab, so the data never leaves your computer. You can even disconnect from the network and the tool keeps working.

How does the delimiter auto-detection work?

The parser scans the first few rows and picks the separator that produces a consistent column count — usually a comma, semicolon, tab or pipe. If it guesses wrong, override it in the delimiter dropdown.

Why is my ID column a string instead of a number?

Values with leading zeros, or digit strings longer than 15 characters, are kept as strings so nothing is silently corrupted. Turn off “Infer value types” to keep every column as text.

Can I build nested JSON from flat columns?

Yes. With “Expand dotted keys” on, a header called profile.city becomes { "profile": { "city": … } }, and numeric segments like tags.0 become arrays.

What is the difference between the three output shapes?

“Array of objects” gives one object per row (the usual API shape), “Column arrays” groups every column into its own list, and “Array of arrays” keeps the raw grid without keys.