Skip to content

CSV ↔ JSON converter. Both directions, on your device.

No data yet.

Files never leave your browser, nothing is uploaded.

JSON output

            

Two-way conversion, no upload, no sign-up

Paste CSV or drop a file: it auto-detects the delimiter (comma, semicolon, tab or pipe), treats the first row as headers unless you toggle it off, 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, quoting, escaping and embedded newlines handled correctly. Everything happens locally on your device, so your files are never uploaded and it keeps working offline. Free forever, no limits.

§ · written guide

How to use the CSV to JSON Converter

This converter turns CSV into a JSON array or NDJSON, and turns a JSON array back into CSV. It parses quoted fields the RFC 4180 way, so commas, quotes and line breaks inside a cell survive the trip. Use it for spreadsheet exports, API test data, database imports and quick data cleanups.

Step by step

  1. Pick a direction

    Use the two tabs at the top. CSV → JSON is selected when the page opens. Switch to JSON → CSV to go the other way. Only the options that apply to the chosen direction stay visible, and the text already in the input box is kept, so clear it or load new data after switching.

  2. Add your data

    Paste into the CSV input box, or press Load .csv to pick a file or drop one on that button. In the JSON → CSV direction the box becomes JSON input and the button reads Load .json. Files up to 15 MB are accepted. Press Load sample to try it with a ready made table first.

  3. Check the delimiter

    Leave Delimiter on Auto-detect and the tool counts commas, semicolons, tabs and pipes on the first non empty line and uses the most frequent one. If it guesses wrong, pick Comma, Semicolon, Tab or Pipe yourself. For JSON → CSV, Auto-detect writes commas.

  4. Set the CSV to JSON options

    First row is header (on by default) turns each row into an object keyed by the header names; turn it off to get an array of arrays. Infer types (on) turns 42 into a number, true and false into booleans and null into null. Pretty-print (on) indents the array by two spaces. NDJSON output writes one object per line instead of an array, and hides Pretty-print.

  5. Read the output

    The JSON output pane updates by itself a moment after you stop typing, and again whenever you change an option. You can also press Convert at any time. The status line above the panes reports what was converted.

  6. Copy or download

    Press Copy to put the result on your clipboard, or Download to save it as converted.json, data.ndjson or converted.csv, depending on the direction and format. Press Clear to empty the input and start again.

Reading the result

  • The status line counts rows and columns and names the delimiter and format. With the sample loaded it reads 10 rows · 7 columns · delimiter "," · JSON array. Before any conversion it says No data yet.
  • A warning about rows with a different column count than the header means some rows have missing or extra cells. Missing cells become empty strings and extra cells are dropped, so check the source file.
  • If the output pane turns red and shows an error, the input could not be read. For JSON → CSV the input must be an array of objects or an array of arrays.
  • In JSON → CSV, an array of objects gets a header row made of every key found across all objects, in the order first seen. An array of arrays gets no header row. Nested objects and arrays are written into the cell as JSON text, and lines end with CRLF.

Tips and common mistakes

  • Turn off Infer types when a column holds phone numbers, ZIP codes or IDs that must stay text. Values with leading zeros such as 007 already stay strings either way.
  • Files saved by European Excel often use semicolons. If every row lands in a single column, set Delimiter to Semicolon ; by hand.
  • Use NDJSON output for tools that read one record per line, such as jq or bulk loaders. Use the JSON array when the consumer wants the whole list at once.
  • Pressing Tab inside the input box adds two spaces instead of moving focus, and Shift+Tab does the same. Click outside the box to move on.
  • An empty cell stays an empty string even with Infer types on. Only the exact text null becomes null.

Privacy and limits

Parsing and conversion run in your browser with plain JavaScript in this page. Nothing you paste or load is uploaded, and nothing is saved, so closing or reloading the tab clears it. Files larger than 15 MB are refused.

Back to the tool

§ 02 · what you can do

Everything a converter should do.

CSV → JSON array One click, auto-detecting comma, semicolon, tab or pipe delimiters.
Export NDJSON JSON Lines for streaming pipelines, BigQuery, DuckDB, MongoDB and LLM fine-tuning sets.
JSON → CSV Switch direction to flatten a JSON array back to CSV, headers and special characters preserved.
Type inference toggle Coerce numbers, booleans and nulls automatically, or keep every cell as a plain string.
Drop a file Drag a .csv or .json file (up to 15 MB) straight onto the tool, nothing leaves your browser.
Copy or download Grab the result as a named .json, .ndjson or .csv file, or copy it in one click.
§ 04 · faq

Frequently asked questions.

How does delimiter auto-detection work?
It 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 appears in some legacy database exports. If auto-detect picks the wrong one, choose the delimiter manually from the dropdown.
What is NDJSON output good for?
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: 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, and the JSON array when it wants the whole structure at once. Most modern data pipelines prefer NDJSON for files over a few MB.
What does type inference do?
Without inference, every cell stays a string. With it on, the converter coerces values: "42" becomes the number 42, "3.14" becomes 3.14, "true" and "false" become booleans, and "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. Toggle it off when your downstream system expects strings, which is common for phone numbers, ZIP codes and product IDs.
How are quoted strings handled?
Per RFC 4180. Cells containing a comma, newline or quote are enclosed in double quotes, and embedded double quotes inside a quoted cell are escaped by doubling them (""). The parser 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.
Why does the conversion fail on my file?
Most common causes: a BOM character at the start (stripped automatically); inconsistent quoting where a stray quote breaks parsing; a different number of columns per row (the status line warns when row column counts differ from the header); mixed CRLF/LF line endings (tolerated); or a different delimiter than auto-detected, pick it manually from the dropdown and convert again. For JSON → CSV, the input must be an array of objects or an array of arrays.
Is the data I paste sent anywhere?
No. The parser is plain JavaScript embedded in this 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 and internal exports you would not want uploaded to a third-party service.

Published · Last updated .

Priya sent you a message Online now

Talk to a Developer Now

Share your name and email to reply.

Reply