CSV ↔ JSON Converter
Convert spreadsheets to JSON (array or NDJSON) and back, handled on your device, with proper quoted-field parsing, type inference and custom delimiters.
Files never leave your browser. Nothing is uploaded.
Convert spreadsheets to JSON (array or NDJSON) and back, handled on your device, with proper quoted-field parsing, type inference and custom delimiters.
Files never leave your browser. Nothing is uploaded.
CSV ↔ JSON Converter is a free text and code tool that runs entirely in your web browser. Paste CSV or drop a file: it auto-detects the delimiter, treats the first row as headers (toggle off if not), and can infer types for numbers, booleans and nulls. Output as a JSON array or NDJSON, or flip the direction and turn a JSON array back into RFC 4180-compliant CSV. Because everything happens locally on your device, your files are never uploaded, there is no sign-up, and it keeps working offline. Like every HeroTool by Digital Heroes, it is 100% free with no limits.
JSON array. The whole dataset wrapped in [ ... ]. The default for any consumer that loads the entire structure into memory at once: most APIs, browser-side JavaScript, small-to-medium datasets. Pretty-printed for human readability. Trade-off: slower to parse on very large files because the parser has to read the entire array before yielding anything.
NDJSON / JSON Lines. Each row as an independent JSON object on its own line. Used by streaming pipelines: pipe through jq for filtering, post one row at a time to a webhook, load into BigQuery, Snowflake or DuckDB without a wrapping array. Use NDJSON when the consumer reads line-by-line; use the array when the consumer wants the whole structure at once. Most modern data pipelines prefer NDJSON for files over a few MB.
With or without headers. First-row-as-header gives you objects keyed by column name ({"name": "Alice", "age": 28}). Without headers, each row is an array (["Alice", 28]). Object form is more readable and self-documenting; array form is smaller on the wire and faster to parse for downstream consumers that already know the schema.
Job 1: Convert a one-off export. Sales team sent you a CSV from their CRM; engineering needs JSON for the import script. Paste, copy, paste. Faster than spinning up a Python script with pandas just to convert one file.
Job 2: Inspect a CSV's structure. When you receive a CSV from a partner and need to confirm the schema before writing the import code, paste here. The status line shows the row count, column count and detected delimiter, and warns when rows do not match the header's column count: enough to draft the import without running it. Pair with our JSON Validator for structure stats on the JSON output.
Job 3: Prepare data for an LLM training set. NDJSON output is the canonical format for fine-tuning datasets across most providers (OpenAI, Anthropic). Convert your CSV training data here, download as .ndjson, upload to the fine-tuning endpoint. Beats writing the conversion in Python.
Job 4: Bulk-import to a NoSQL database. MongoDB, DuckDB, BigQuery all accept NDJSON for bulk import. Convert here, download, run mongoimport --type=json --jsonArray=false or equivalent. The browser handles files up to the 15 MB drop limit cleanly; for larger files run the conversion in a Node or Python script.
The converter counts how often comma, tab, semicolon and pipe appear on the first non-empty line and picks the most frequent. Comma is the standard; tab is common in TSV exports; semicolon is the European convention (used by German and French Excel); pipe is rare but appears in legacy database exports. If auto-detect picks the wrong one, choose the delimiter manually from the dropdown.
NDJSON (Newline-Delimited JSON, also called JSON Lines) writes each row as an independent JSON object on its own line. Streaming consumers rely on it: you can pipe each line through jq, post one row at a time to a webhook, or load into BigQuery, Snowflake or DuckDB without a wrapping array. Use NDJSON when the consumer reads line-by-line; use the JSON array when the consumer wants the whole structure at once. Most modern data pipelines prefer NDJSON for files over a few MB.
Without inference, every cell is a string. With inference on, the converter coerces: '42' becomes the number 42, '3.14' becomes 3.14, 'true' and 'false' become booleans, 'null' becomes null. Values that only look numeric keep their text form: '007' stays a string because the leading zeros would be lost as a number. Useful when the CSV is destined for a strongly-typed downstream consumer (a database, an API). Toggle it off if your downstream system expects every value as a string: common with phone numbers, ZIP codes or product IDs.
Per RFC 4180. Cells containing a comma, newline or quote must be enclosed in double quotes; embedded double quotes inside a quoted cell are escaped by doubling them (""). The parser on this page handles all three cases in both directions, so a cell like O"Brien, John appears in CSV as "O""Brien, John" and is un-escaped correctly on the way back to JSON.
Most common causes: (1) BOM character at the start, which we strip automatically. (2) Inconsistent quoting: some rows use quotes, some do not, and a stray quote breaks parsing. (3) A different number of columns per row, common in hand-edited CSV; the status line warns when row column counts differ from the header. (4) Mixed line endings (CRLF vs LF), which the parser tolerates. (5) A different delimiter than auto-detected: pick it manually from the dropdown and convert again.
No. The parser is plain JavaScript embedded in this static page, so the conversion runs entirely on your device. There is no library CDN fetch and no network request carries your content. Safe for customer data, financial records, internal exports: anything you would not want uploaded to a third-party service.