Skip to content
GivenTool

Convert CSV to JSON

Convert CSV or TSV into a JSON array of objects, with delimiter detection and number/boolean types.

0 / 2,000,000 characters · Updates as you type.

Settings

Codes with leading zeros (007, 01234) always stay text.

Runs in your browser. Nothing you type is sent anywhere.

Spreadsheets export CSV; code, APIs and databases want JSON. This converter reads CSV the way the RFC 4180 standard describes it: fields in double quotes may contain commas, line breaks and doubled quotes ("" for a literal quote), lines can end in Windows CRLF or Unix LF, and a byte-order mark from Excel is ignored. Each row becomes an object whose keys come from the header row, or an array of values if you prefer rows.

The delimiter is detected from the first lines, so semicolon-separated files from European Excel, tab-separated exports and pipe-delimited logs work without changing a setting. With type detection on, numbers become JSON numbers and true/false become booleans, but anything that only looks numeric is left alone: postcodes and phone numbers with leading zeros, values with a plus sign or a decimal comma, and integers too large to be exact in JavaScript all stay strings, so no data is quietly corrupted. Empty cells can become empty strings, null, or be left out.

Real-world files are messy, and the output tells you so instead of guessing silently. Rows with fewer fields than the header get empty values; rows with more get extra column_N keys; blank or repeated header names are renamed (column_2, name_2) and counted in a note. An unclosed quote stops the conversion with the line and column where it started. The conversion runs entirely in your browser, which matters for customer lists and exports that should not be uploaded anywhere.

How to use it

  1. Paste the CSV (or TSV) into the input, or copy cells from a spreadsheet and paste them: they arrive tab-separated.
  2. Check that "First row is a header" matches your data, and choose how values and empty cells are written.
  3. Read the facts under the result: rows, columns, the delimiter used and any warnings about ragged rows.
  4. Copy the JSON or download it as data.json.

Frequently asked questions

Why did my zip codes keep their quotes?

Values with leading zeros, such as 01234, are kept as text on purpose: turning them into numbers would drop the zero. Choose "Keep everything as text" to make every value a string.

My file uses semicolons. Do I need to change anything?

No, the delimiter is detected automatically. If detection picks the wrong one (for example in a one-column file), choose the delimiter yourself.

Can a cell contain a line break?

Yes, as long as the cell is in double quotes, which is how Excel and Google Sheets export it.

What if rows have different numbers of columns?

Missing cells become empty (or null, or are left out, as you chose) and extra cells get keys named column_4, column_5 and so on. A note says how many rows were affected.

How large a file can I convert?

Up to 2 million characters, roughly 2 MB of CSV. The work happens on your device, so there is no upload wait.