/

CSV to JSON

Processed Client Side

Convert CSV or TSV data into a clean JSON array of objects, with header detection and type inference.

CSV · 4 lines
4 lines · 107 chars
Length: 107Lines: 4Size: 107 BytesCursor: 1:1
JSON
JSON3 records
jsonLength: 282Lines: 20Size: 282 BytesCursor: 1:1

Bookmark this tool now — skip the search next time you need it.

About CSV to JSON

This tool runs entirely in your browser. Whatever you paste is processed on your own device and is never uploaded, logged, or sent to any server.

Paste CSV or TSV data — an export from a spreadsheet, a database dump, a log extract — and get back a clean JSON array of objects. The parser is a proper CSV parser rather than a split on commas: it understands quoted fields, delimiters and line breaks inside quotes, and doubled quotes as an escaped quote, so a value like "Smith, John" stays one field. It can auto-detect which delimiter your file uses, treat the first row as column names, and infer types so that numbers become numbers and true/false become booleans instead of everything arriving as strings.

Key features

  • Real CSV parsing — quoted fields, embedded commas, embedded newlines, and doubled quotes are all handled correctly
  • Auto-detect delimiter, or force comma, semicolon, tab, or pipe explicitly
  • Header row mode maps each column name to a JSON key; turn it off to get arrays of values instead
  • Infer types converts numeric strings to numbers and true/false to booleans, leaving genuine text alone
  • Output indentation of 2 spaces, 4 spaces, or minified for a compact payload
  • Syntax-highlighted JSON output so the resulting structure is easy to scan
  • Handles ragged rows and trailing blank lines without producing junk records
  • Copy the JSON in one click, ready to paste into a fixture, a seed script, or an API request
  • Runs fully in your browser — spreadsheet exports containing personal data never get uploaded

How to use it

  1. Paste your CSV or TSV data into the input pane.
  2. Leave the delimiter on Auto-detect, or pick the exact one if your data is unusual.
  3. Keep Header row on if the first line holds column names — this is what turns rows into keyed objects.
  4. Turn Infer types on to get real numbers and booleans, or off to keep every value as a string.
  5. Choose 2 spaces, 4 spaces, or Minified for the output, then click Convert and copy the JSON.

Tips & common mistakes

  • Turn Infer types off when a column holds IDs, ZIP codes, or phone numbers with leading zeros — inference will read 01234 as the number 1234 and lose the zero.
  • Auto-detect looks at the delimiter frequency in the first rows. If your data has more semicolons inside quoted text than actual separators, set the delimiter explicitly.
  • TSV files work as-is — pick Tab, or let auto-detect find it. Tab-separated data is often safer than CSV because tabs rarely appear inside real values.
  • With Header row off you get arrays of values instead of objects, which is what most charting libraries and CSV loaders actually want.
  • If your spreadsheet exported a UTF-8 BOM, the first column name can come through with an invisible prefix character. Delete the first character of the header line if the first key looks wrong.
  • Minified output is the right choice when the JSON is going into an environment variable or a request body; indented output is for files people will read.
  • Want to view the resulting array as a table rather than raw JSON? Open it in the CSV Viewer & Editor.

Related tools

Browse all 24 JSON tools

Frequently asked questions

10

Paste your CSV or TSV data into the input pane and press Convert. The first row is used as the object keys and each following row becomes a JSON object in the output array.

Yes. On Auto-detect it inspects the first line and picks the most likely delimiter — comma, semicolon, tab, or pipe. You can also choose one explicitly.

With "Infer types" enabled, values like 42, 9.5, true, and false are converted to JSON numbers and booleans. Turn it off to keep every value as a string — useful for IDs with leading zeros.

The parser follows the RFC 4180 convention, so quoted fields containing commas, quotes, or line breaks are parsed correctly, with doubled quotes ("") treated as an escaped quote.

No. The conversion runs entirely in your browser — your CSV never leaves your device.

Turn it off for any column holding IDs, ZIP codes, or phone numbers with leading zeros — inference reads 01234 as the number 1234 and loses the zero. Leave it on when the data is genuinely numeric or boolean.

Yes. Choose Tab as the delimiter, or leave auto-detect on and it will find it. Tab-separated data is often safer than CSV because tabs rarely appear inside real values.

You get an array of arrays instead of an array of objects — each row becomes a list of values in column order. That is the shape most charting libraries and bulk loaders expect.

Your spreadsheet exported a UTF-8 byte order mark, an invisible character at the very start of the file. Delete the first character of the header line before converting.

Yes. This is a proper CSV parser rather than a split on commas, so quoted fields containing delimiters, line breaks, and doubled quotes are all parsed correctly into a single value.