Skip to content
Runs local · no upload

CSV to JSON converter

Comma or semicolon, period or comma, BOM or no BOM — four standards, one converter. The leading zero in a postal code survives because the column stays a string instead of a number.

Runs locally in the browser — no data leaves your device.

CSV with broken umlauts, mixed delimiters or duplicate headers? Run it through CSV cleaner first. CSV cleaner.

Profile
Header
Type inference
Output structure

Array of Objects is the REST-API default. Object of Arrays is column-major for DataFrames. NDJSON is one line per record, ideal for streaming.

JSON output

How It Works

  1. 01

    Paste text or code

    Paste your content into the input field or type directly.

  2. 02

    Instant processing

    The tool processes your content immediately and shows the result.

  3. 03

    Copy result

    Copy the result to your clipboard with one click.

Privacy

All calculations run directly in your browser. No data is sent to any server.

The converter reads CSV or TSV, auto-detects the delimiter and emits JSON in three shapes — array of objects, object of arrays, or NDJSON one record per line. Four presets cover the dialects, including German Excel with semicolon and UTF-8 BOM. Leading zeros, IBANs and phone numbers stay as strings automatically. Dot-notation headers like `user.address.city` produce nested JSON trees.

01 — How to Use

How do you use this tool?

  1. Paste CSV into the input field or drop a file onto the dropzone
  2. Pick a preset — RFC 4180, German Excel, TSV or pipe-delimited — or keep auto-detect
  3. Confirm or change the type per column (leading zeros stay string, IBANs stay string)
  4. Pick the output structure: array of objects (default), object of arrays or NDJSON
  5. Copy the JSON or switch to the JSON-to-CSV tab for the reverse path

What This Tool Does

The converter reads a CSV or TSV file and turns it into JSON — in three structural variants, depending on what you do with the result next. While reading, it auto-detects the delimiter, guesses column types and respects leading zeros so a German postal code like 07001 does not shrink to the number 7001.

Pure-client. Every input stays in your browser. No server, no cookie wall, no tracking. Large files beyond five megabytes still process locally — through the NDJSON output that avoids bloating into a single giant array.

Which CSV Dialects Does the Converter Support?

CSV is not a single standard. Four presets cover the dominant dialects that turn up in real-world workflows.

RFC 4180 strict

RFC 4180 has been the de-facto international standard since 2005. Comma as the delimiter, period as the decimal separator, double-quote as the escape — so "O""Connor" for a name with an apostrophe. English-language APIs, research exports and most US spreadsheets follow this profile.

German Excel

German Excel exports differently by default: semicolon as the delimiter, comma as the decimal separator, UTF-8 BOM at the start. Run a German Excel CSV through an RFC 4180 parser and you get a single fat column back — the parser cannot tell the thousand-period from the decimal-comma. The German Excel preset honours all three idiosyncrasies in one click.

Tab-separated (TSV)

TSV uses the tab character as the separator. Without a visible character it tends to be more robust against comma or semicolon collisions in the content — research exports from R, Pandas and SPSS often land as TSV. Header row and quoting follow the same rules as CSV, only the delimiter changes.

Pipe-delimited

The pipe character | is common in mainframe, SAP and ERP exports. The advantage: pipe rarely shows up in natural-language content, so collisions are unusual. The drawback: Excel does not recognise it as a default and prompts for the delimiter at import time.

Which JSON Structures Does the Converter Emit?

Three structures, three target systems.

Array of objects

[{"name": "Alice", "age": 30}, {"name": "Bob", "age": 25}] — the default for REST APIs. Each CSV row becomes one object; the header row supplies the keys. Human-readable, directly consumable by any JavaScript frontend that expects a records array.

Object of arrays

{"name": ["Alice", "Bob"], "age": [30, 25]} — the column-oriented form. Libraries like Pandas, R data frames and D3.js prefer this layout because column operations (mean, filter, plot) work more efficiently than converting from a records array first.

NDJSON

NDJSON — one JSON object per line, no enclosing array:

{"name":"Alice","age":30}
{"name":"Bob","age":25}

Streaming-friendly: an NDJSON reader processes one line at a time without loading the whole file into memory. For CSV files larger than five megabytes the converter recommends NDJSON automatically — a 100,000-record array reaches three-digit megabytes as a single JSON string instantly.

How Does the Converter Protect Leading Zeros?

Leading zeros are the most common CSV-to-JSON conversion bug. The moment a cell like 07001 (postal code Sondershausen) becomes a number, the zero disappears and the address database breaks. Three heuristics prevent that.

Consistent leading zeros

If the column analyzer sees that every non-empty value in a column starts with 0 and runs at least three digits long, the column is classified as string — even when the rest of the value is digits. A ZIP column with 07001, 80331, 10117 stays a string, not a number.

IBAN detection

IBAN follows a clear pattern: two letters (country code), two check digits, then 10–30 alphanumeric characters. If every row of a column matches the pattern, the column stays a string — even when German IBANs contain only digits beyond the country code.

Phone detection

Phone numbers often carry +, dashes, parentheses or spaces. When a column shows ten or more digits PLUS at least one non-digit character per value, the analyzer locks it to string. That keeps +49 30 1234567 intact as a phone string instead of turning it into a nonsensical number.

Manual override

The heuristic is conservative — it errs toward string rather than number. If you want a detected leading-zero column as a number anyway, change the type per column via the dropdown in the column panel. The change applies on the next render.

How Does Dot-Notation Produce Nested JSON?

A flat CSV header like name,email,plz yields a flat JSON object. When the source data is structured — say an address table — dot notation pays off:

user.name,user.email,user.address.plz
Ada,[email protected],07001

becomes

[
  {
    "user": {
      "name": "Ada",
      "email": "[email protected]",
      "address": { "plz": "07001" }
    }
  }
]

Multiple paths under the same prefix merge into one object automatically. The reverse direction (JSON-to-CSV tab) flattens nested trees back through the same notation — a round-trip-capable format.

When Does the Bidirectional Mode Help?

Some workflows need a round trip: export CSV, adjust the data in a JSON editor, convert back to CSV. The second tab JSON-to-CSV applies the same preset and delimiter choice as the forward path. Paste an array of objects as JSON and you get CSV with a header row and RFC 4180 quoting; nested fields flatten to dot notation.

Which File-Size Limits Apply in Practice?

Pure-client does not mean unlimited. Three thresholds shape how the converter behaves at different file sizes.

Below 5 MB — standard mode

Up to five megabytes of CSV — typically a few thousand rows — the converter handles directly. Array of objects or object of arrays render smoothly. The result panel shows the JSON immediately, copyable in one click.

Beyond five megabytes the converter suggests NDJSON via a banner. Background: a 100,000-record array becomes a 30- to 80-megabyte JSON string quickly, which slows the render path noticeably and freezes the copy-to-clipboard step for seconds. NDJSON sidesteps that because it streams line by line.

Beyond 50 MB — split first

Browser memory generally handles a hundred megabytes, but rendering a result field that size makes the UI sluggish. For files in the hundreds of megabytes range it is faster to split the CSV outside the browser — with a shell script for instance — and convert chunk by chunk.

  • CSV cleaner — for broken CSV files with mojibake umlauts, mixed delimiters or duplicate headers. The pre-step to this converter when the input is not clean.
  • JSON to CSV — the specialised reverse path if you only need JSON-to-CSV without the CSV-input options.
  • CSV to Markdown — when the target format is a Markdown table instead of JSON.
  • JSON formatter — format and validate the generated JSON before you pipe it onward.

Last updated:

You might also like