Home Tools Blog About

Convert CSV to JSON

In short

Convert CSV/TSV to JSON with delimiter auto-detect, type coercion options, nested keys, 4 output formats. Free, offline, client-side, instant.

  • Runs in your browser
  • Nothing uploaded
  • Free, no sign-up

Convert CSV/TSV to JSON with delimiter auto-detection (comma / semicolon / tab / pipe), 3 type-coercion modes (preserves "007" ZIP codes correctly), nested keys via dot notation, and 4 output formats (array / NDJSON / object-keyed / 2D).

🛡
100% PrivateNo server uploads, ever
InstantRuns in your browser
💧
No WatermarksClean output, always
🆓
Free ForeverNo accounts, no limits

How to Use Convert CSV to JSON

Convert CSV to JSON · free online tool · All Tools Verse
Convert CSV to JSON. Free online tool that runs in your browser.
  1. Paste CSV into the input pane, upload a .csv/.tsv file, or click Load sample.
  2. Pick a delimiter or leave on Auto-detect (handles comma / semicolon / tab / pipe).
  3. Toggle First row contains headers - affects output structure.
  4. Pick a type-coercion mode: All strings (safest), Smart with safe IDs (keeps "007", UUIDs as strings), Auto-detect (full conversion - may lose ZIP codes).
  5. Toggle Nest dot-notation keys to turn headers like address.city into nested JSON objects.
  6. Pick an output format: array of objects (default), NDJSON (one per line - perfect for streaming), keyed object (lookup by ID), or 2D array.
  7. Copy or download data.json.

Frequently Asked Questions

Why does “007” become 7 in standard converters?

JavaScript’s Number("007") returns 7 – the leading zero is dropped because numbers in JSON don’t preserve formatting. For ZIP codes (US: 5-digit, often starting with 0), phone numbers, ID badges, and product SKUs, this is a critical bug. “Safe IDs” mode keeps strings that start with 0 as strings. “All strings” mode preserves everything as strings (safest for data integrity).

What’s NDJSON and when do I use it?

Newline-Delimited JSON – one JSON object per line, no outer array. {"id":1,...}n{"id":2,...}. Used for: log files, streaming APIs (you can parse line-by-line without loading the whole file), big data tools (Spark, BigQuery, Elasticsearch bulk ingest). Smaller than indented JSON, but harder to read by hand.

What’s dot-notation nesting?

Headers like address.street + address.city become a nested address object: {name:"X", address:{street:"...", city:"..."}}. Common for normalizing flat exports back into hierarchical structures. Toggle the option on; existing single-level keys stay as-is.

Does this handle quoted fields with internal commas?

Yes. The parser is RFC 4180 compliant: "Williams, Joe" stays as one field. It also handles escaped quotes ("" inside a quoted field = a literal "), and quoted fields with internal newlines (multi-line cells).

How does the auto-delimiter detection work?

The tool counts occurrences of comma, semicolon, tab, and pipe in the FIRST line of input and picks the most frequent. This works for most clean CSV files. Heads-up: if your CSV has a quoted field in the first line containing the test delimiters (e.g. "a,b,c",1,2), detection might pick the wrong one – switch to manual.

What’s the difference between CSV and TSV?

TSV (Tab-Separated Values) uses tabs instead of commas. Tabs almost never appear in text data, so TSV needs NO quoting (you can paste a tab-separated table from Excel directly). The downside: tabs are invisible – you can’t see them in your editor. The tool auto-detects TSV by counting tabs in the first line.

Why do EU locales use ; as delimiter?

European CSV uses ; because , is the decimal separator (German: 3,14; English: 3.14). If Excel in a German locale exports CSV with comma, the numbers 3,14 get split into two fields. Microsoft solved this by making Excel export with semicolon in EU locales – the “list separator” varies per region.

Does the tool handle empty cells correctly?

Empty fields between delimiters (a,,c) become empty strings "" in “All strings” mode and null in “Auto-detect” mode. The “Safe IDs” default uses empty strings for clarity. Excel-exported CSV may have entire empty rows at the end – they’re stripped.

Is my data secure?

Yes. CSV input + JSON output stay in your browser. Uploaded files via file picker are read with FileReader – never sent to a server.

Keep going

Related Tools

All Document tools →
Share

Embed this tool

Add this free tool to your website. Copy and paste the code: