Skip to main content
File Tools

CSV ↔ JSON Converter

Convert CSV to JSON or back. Automatic delimiter detection, quoted fields, type coercion.

No upload — your files never leave your device

  • 100% private
  • Runs in your browser
  • Works offline
  • No sign-up
CSV → JSON

Preview (3 rows)

nameemailroleactive
Alicealice@example.comadmintrue
Bobbob@example.commembertrue
Charliec@example.commemberfalse

About CSV ↔ JSON

CSV ↔ JSON converts tabular data in both directions — paste or drop a CSV and get a JSON array of objects, or paste a JSON array and get a clean CSV. There's a live table preview so you can see the parsed result before downloading, plus controls for the delimiter (comma, tab, semicolon, pipe), the quote character, and whether the first row is a header. Useful for data migrations, API testing, and quickly inspecting structured exports.

  • No uploads
  • Browser-only
  • Works offline
  • 100% free

How it works

  1. 1

    Choose your direction

    Toggle CSV-to-JSON or JSON-to-CSV at the top. Your input pane updates to match.

  2. 2

    Paste or drop your file

    Paste text directly or drag a .csv / .json file in. The parsed table preview renders immediately.

  3. 3

    Adjust and download

    Pick delimiter, quoting, and header behaviour. Copy the output to clipboard or save it as a file.

Delimiters, quoting and escaping (the RFC 4180 rules)

CSV looks trivial until a value contains a comma. The de-facto rules are set out in RFC 4180: fields are separated by commas, and any field containing a comma, a double-quote or a line break must be wrapped in double-quotes. A literal double-quote inside such a field is escaped by doubling it. Get this wrong and a single address field with a comma in it silently shifts every later column by one, corrupting the whole row without any error.

The 'C' in CSV is also a polite fiction. European locales that use a comma as the decimal separator often delimit with semicolons instead, and tab-separated (TSV) files are common exports from spreadsheets and databases. A good converter lets you pick the delimiter; assuming a comma when the file is semicolon-delimited produces one giant column. Always confirm the actual separator before trusting the parse.

Header rows and type-inference traps

  • The first row is usually headers that become JSON keys — but not always. If your data legitimately starts with a row that looks like data, a converter that assumes a header will eat your first record. Check the toggle.
  • CSV has no types — every cell is text. Inferring that "42" is a number and "true" is a boolean is a guess that's usually helpful and occasionally destructive.
  • The classic data-loss bug: a ZIP code like 02118, a phone number, or an ID like 007 read as a number loses its leading zero and becomes 2118. Long numeric IDs can also exceed JavaScript's safe integer range and lose their last digits. Keep these as strings.
  • Ambiguous values bite too: "NA" might be a country code (Namibia) or 'not available'; a bare 2026-06-19 might be parsed as a date or left as text depending on the tool. Know which your data means.

Flattening nested JSON — and what doesn't survive

JSON is a tree; CSV is a flat grid. Converting JSON to CSV only works cleanly when each record is a flat object with the same keys. Nested objects have to be flattened — typically by joining the path with a dot, so a nested user name becomes a column user.name. Arrays are the real problem: a record with a list of three tags has no natural single-row representation, so converters either join the array into one cell, explode it into multiple rows, or spill it across numbered columns. None of these is lossless in both directions.

The honest summary: CSV-to-JSON is a perfect round-trip only for flat, uniform, string-typed tabular data. The moment you have nesting, ragged records or types that matter, something has to give. For working with the JSON side directly — validating, formatting, querying — use the JSON Formatter; for a spreadsheet view of the same rows, open the Spreadsheet.

Frequently asked questions about CSV ↔ JSON

  • How does it handle commas, quotes, and newlines inside cells?

    It implements the RFC 4180 CSV spec: fields containing the delimiter, the quote character, or a newline are wrapped in double-quotes and internal quotes are doubled. The parser handles these cases on input too, so round-tripping data with embedded commas or multi-line cells works correctly.

  • What if my JSON has nested objects or arrays?

    CSV is fundamentally flat — nested values are stringified into their JSON representation in the cell. For more useful flat output, pre-process your JSON to flatten nested keys (e.g. with dot-paths like `user.address.city`) before converting, or use the Spreadsheet editor for richer multi-table handling.

  • Which delimiters are supported?

    Comma (standard CSV), tab (TSV), semicolon (European Excel default), and pipe — plus a custom delimiter field for less-common formats. Auto-detect picks the most likely delimiter on paste, but you can override it.

Privacy, offline use, browser support, and pricing questions are answered on the site-wide FAQ.

See all File tools