CSV to JSON Converter

Convert CSV (or TSV) to a JSON array of objects.

Result

[
  {
    "id": 1,
    "name": "Ana, Lisbon",
    "active": true,
    "zip": "007"
  },
  {
    "id": 2,
    "name": "Bo",
    "active": false,
    "zip": 10001
  }
]
14 lines · 166 bytes
  • 2 records. Delimiter: comma. Leading zeros (007) stay as text so IDs and ZIP codes are not damaged.

How does CSV become JSON?

A CSV file is a table: each line is a row, and values are separated by a comma or another delimiter. JSON is the format web apps and APIs use. The usual conversion makes each row an object, with the header row giving the key names.

The tool reads quoted fields, doubled quotes and line breaks inside quotes following RFC 4180, and detects the delimiter. The sample has two rows, so it yields two objects. Ana, Lisbon with its comma stays whole because it is quoted, and the zip 007 stays text.

How to use the CSV to JSON Converter

  1. Paste CSV or TSV on the left.
  2. Leave the delimiter on Detect, or pick one.
  3. Say whether the first row is the header.
  4. Choose to detect numbers and true/false or keep all as text, and then pick the indent.

Real situations

When people use the CSV to JSON Converter

  • 1

    Load a spreadsheet export into code

    Export a sheet as CSV and convert it to JSON to use in a script, a test or a web app.

  • 2

    Build test data

    Write sample rows in a spreadsheet and turn them into JSON fixtures.

  • 3

    Convert TSV pasted from a sheet

    Cells copied from a spreadsheet arrive tab-separated, and the tool detects the tab delimiter.

  • 4

    Protect IDs and ZIP codes

    Values with leading zeros stay as text, so 007 is not turned into the number 7.

Good to know

  • Turn off value detection if you want every value as a string.
  • If the first row is data, choose that option and you get arrays of values instead of objects.

FAQ

CSV to JSON Converter: questions answered

How do I convert CSV to JSON?

Paste your CSV, and the tool makes a JSON array with one object per row, using the first row as the keys. The sample gives objects with id, name, active and zip.

Why does 007 stay as text but 10001 becomes a number?

A value with a leading zero is kept as text so IDs and ZIP codes are not damaged. In the sample, "007" stays a string while 10001 becomes the number 10001. Turn off detection to keep all values as text.

How are commas inside a field handled?

A field wrapped in double quotes can contain commas, line breaks and doubled quotes. In the sample, "Ana, Lisbon" becomes one name value.

What if my CSV has no header row?

Choose that the first row is data. The result is then an array of arrays, such as ["1","Ana, Lisbon","true","007"], instead of objects.

Can it read semicolon or tab separated files?

Yes. The delimiter is detected by default, and you can also choose comma, semicolon, tab or pipe. A note under the result names the delimiter used.

What happens to true and false?

With detection on, true and false become JSON booleans. With it off, they stay as the text "true" and "false".

Is this CSV to JSON Converter free and private?

Yes. It is free with no sign-in, and every calculation runs inside your browser. Nothing you type is sent to a server or stored, and the page keeps working offline once it has loaded.

Private by design. No accounts, no cookies, no tracking. Everything you type stays on your device.

How we keep it that way