Skip to main content
UtilityStack

CSV ↔ JSON Converter — round-trip tabular data

Paste CSV and get JSON, or paste JSON and get CSV. Custom delimiter (comma, semicolon, tab, pipe), header row toggle, proper RFC 4180 quoting on output.

CSV
JSON
[
  {
    "id": "1",
    "name": "Alice",
    "email": "alice@example.com",
    "signup_date": "2024-01-12"
  },
  {
    "id": "2",
    "name": "Bob",
    "email": "bob@example.com",
    "signup_date": "2024-03-04"
  },
  {
    "id": "3",
    "name": "Charlie",
    "email": "charlie+admin@example.com",
    "signup_date": "2024-05-22"
  }
]

Why convert CSV and JSON?

CSV is the lingua franca of data exchange — every spreadsheet, every database export, every analytics dashboard speaks it. JSON is the lingua franca of APIs, config files, and modern programming. The two formats describe the same data shape (tabular, row-based) with different syntactic rules, so converting between them is mechanical when you respect each format's quoting rules.

This converter handles the common cases properly: CSV fields containing commas, quotes (escaped as double quotes per RFC 4180), or newlines are quoted on output; JSON arrays of objects map to CSV with the union of keys as the header; JSON arrays of arrays map to CSV without a header. Custom delimiters (semicolon for European Excel, tab for TSV, pipe for legacy systems) are supported.

How to use this tool

  1. Pick the direction (CSV → JSON or JSON → CSV) using the toggle.
  2. Paste your data on the left. The output appears instantly on the right. Adjust the delimiter for your CSV variant (comma is default; many European exports use semicolon).
  3. Toggle 'First row is header' depending on whether the first row of your CSV contains column names. Click Flip to swap input and output for chained conversions; Copy to grab the result.

Frequently asked questions

Does the parser handle quoted fields?

Yes. The CSV parser respects RFC 4180: fields containing the delimiter, double quotes or newlines must be wrapped in double quotes, with embedded quotes doubled. The output writer escapes the same characters automatically.

What about Excel CSV with semicolons?

European Excel exports use ';' as the delimiter (because comma is the decimal separator). Pick ';' from the delimiter dropdown. The parser is delimiter-agnostic; only the dropdown choice matters.

How does it handle headers?

When 'First row is header' is on, the first CSV row is used as object keys, and the JSON output is an array of objects. When off, the JSON output is an array of arrays (one per row). Reverse direction does the symmetric thing.

Are types preserved?

CSV is untyped — every field is a string. The JSON output is also strings, even when the field looks like a number or boolean. Convert types in your code if you need typed JSON. The reverse direction (JSON → CSV) renders all values as their string representation.

What's the file-size limit?

The parser runs in your browser; on a modern laptop, files up to ~10 MB convert in well under a second. Larger files work but the textareas can lag — for huge CSVs, prefer command-line tools like csvkit or Python's pandas.

Common use cases

Where flipping CSV and JSON pays off in seconds.

Importing a spreadsheet into a JSON API

Boss exports an Excel sheet of users; your backend ingests JSON. Save as CSV, paste here, get the JSON, send to the API. Saves writing a one-off script.

Generating a quick CSV report

Your code returns a JSON array. Drop it into the converter, get a CSV ready to open in Excel, Google Sheets or any analytics tool. Handy for ad-hoc reports.

Sanity-check a CSV before parsing

When ingesting a vendor's CSV file, paste a sample to verify the delimiter and header row. Common bugs (semicolon vs comma, missing header) reveal themselves immediately.

Bridging legacy and modern systems

Old database exports CSV; new microservice expects JSON. Run the conversion as a one-off migration step, then automate with code if it becomes regular.

Tips and shortcuts

Habits that prevent CSV/JSON gotchas.

Always confirm the delimiter

comma, semicolon, tab — vendors disagree. Open the CSV in a text editor and look at the first line before pasting; the wrong delimiter produces a single-column 'CSV' that's obvious as soon as you see the JSON output.

Watch out for BOM at the start

Excel often saves CSVs with a UTF-8 BOM (byte-order mark) at the start. The first column header may then look like 'name' but contains an invisible \ufeff prefix. Strip the BOM in your editor before pasting if your column names look weirdly suffixed.

Quote fields with newlines

If a field contains a newline (multi-line address, comment), it must be quoted in CSV. Don't try to use a single-line CSV for genuinely multi-line data — switch to JSON or another format that handles it natively.

Round-trip to verify

When in doubt, convert CSV → JSON → CSV (using Flip). If the second CSV doesn't match the first, the original was malformed (probably unquoted commas or stray quotes). The round-trip is a free format-validity check.

Related tools