Private CSV to JSON conversion in your browser

CSV to JSON Converter

Convert CSV to JSON online in seconds. Paste data or choose a .csv or .tsv file, preview the JSON, then copy or download the result. Choose whether your first row contains headings and whether to keep numbers as text. Your data stays in your browser.

CSV TO JSON CONVERTERTurn CSV rows into JSON you can copy or download.
No upload required
CSV Input
JSON Preview
[
  {
    "id": "00123",
    "name": "Smith, Jane",
    "city": "London",
    "active": "true"
  },
  {
    "id": "00124",
    "name": "Ben",
    "city": "Paris",
    "active": "false"
  }
]
2 rows · 4 columns · comma-separated
Conversion options Column names, separators & number handling

Values stay as text unless you enable number detection. Even then, IDs with leading zeros and numbers that might lose precision stay as text.

RESULT2 rows converted to JSON
CSV files stay in your browser No sign-up Free to use
01

What Is CSV to JSON Conversion?

CSV to JSON conversion turns rows and columns of tabular data into structured JSON. When the first row contains headers, each header becomes a JSON property name and each following row becomes an object in a JSON array. This makes spreadsheet data easier to use in apps or share with an API.

This free online CSV to JSON converter works with pasted text or files from your device. Your CSV stays in your browser instead of being uploaded to a conversion server.

02

How to Convert CSV to JSON Online

01

Paste or upload CSV

Paste comma-separated data into the input, or choose a CSV or TSV file from your device.

02

Choose conversion options

Check the header setting and delimiter. Keep values as text or optionally detect safe numbers and booleans.

03

Copy or download JSON

Review the JSON or table preview, then copy the result or download converted.json.

03

CSV to JSON Example

With the first row set as headers, each remaining CSV row becomes one JSON object. By default, numbers and IDs remain text, so values such as 00123 keep their leading zeros.

CSV INPUT
id,name,city,active
00123,"Smith, Jane",London,true
00124,Ben,Paris,false
JSON OUTPUT
[
  {
    "id": "00123",
    "name": "Smith, Jane",
    "city": "London",
    "active": "true"
  },
  {
    "id": "00124",
    "name": "Ben",
    "city": "Paris",
    "active": "false"
  }
]
04

How CSV Headers Become JSON Keys

With First row contains headers enabled, the first row supplies the property names for every JSON object. For example, id,name,city becomes the keys id, name, and city. The first row itself is not included as a data record.

Example: CSV without a header row

If your CSV starts directly with data, turn off First row contains headers. Each CSV row then becomes an array of values, so no data row is mistaken for column names.

CSV INPUT — NO HEADERS
Ada,London,28
Ben,Paris,34
JSON OUTPUT — ARRAY OF ARRAYS
[
  [
    "Ada",
    "London",
    "28"
  ],
  [
    "Ben",
    "Paris",
    "34"
  ]
]

Duplicate headings and rows with missing values

Repeated column names are made unique: two name columns become name and name_2. Empty headings are named column_3 or another numbered name. When a row has fewer cells, the missing values become empty strings. Extra cells are kept in added columns, with a warning rather than being silently discarded.

CSV INPUT — REPEATED & EMPTY HEADERS
name,name,
Ada,Smith,London
Ben
JSON OUTPUT — NO LOST COLUMNS
[
  {
    "name": "Ada",
    "name_2": "Smith",
    "column_3": "London"
  },
  {
    "name": "Ben",
    "name_2": "",
    "column_3": ""
  }
]

The warning and table preview show any headings that were renamed. Check the JSON field names before using the data in another app.

05

Preserve IDs, Numbers and Booleans

CSV files store cell text, not JSON data types. A value such as 00123might be an order ID rather than the number 123. This converter therefore keeps every value as a string by default. You can turn on Detect numbers and booleans if you want ordinary numbers and true/false converted to JSON values.

CSV valueDefault JSONWith type detection
00123"00123""00123"
28"28"28
true"true"true
false"false"false
007"007""007"
9007199254740993"9007199254740993""9007199254740993"
0.1234567890123456789"0.1234567890123456789""0.1234567890123456789"
1.20"1.20"1.2
null"null""null"
Empty cell""""

Even with number detection enabled, IDs with leading zeros, very large integers, and long decimals stay as text. Values such as 1.20 may become 1.2 when converted to a number. Leave number detection off if the exact text matters, such as prices, IDs, or fixed-format codes. The converter does not guess dates or convert the text null to JSON null.

06

Handle Quoted Fields, Commas and Line Breaks

A properly quoted CSV field can contain commas, double quotes and even line breaks without becoming several columns or rows. Two double quotes inside a quoted field represent one double quote in the value.

In this example, the second CSV field starts on one line and ends on the next. It still becomes a single JSON string. JSON represents that embedded line break as \n.

CSV INPUT — MULTILINE FIELD
name,note
"Smith, Jane","He said ""Hello""
then left"
JSON OUTPUT — SAME FIELD
[
  {
    "name": "Smith, Jane",
    "note": "He said \"Hello\"\nthen left"
  }
]

The tool also handles different kinds of line breaks, a final row without a line break, and empty values inside quotes. If a quoted value is not closed correctly, the error message shows which line to check.

07

Convert CSV and TSV Files to JSON

Choose a .csv or .tsv file from your device. It is converted in your browser without being sent to a server. UTF-8 files are supported, including those with a BOM marker. If the columns look wrong, open Conversion options and choose the correct separator.

File or inputWhat happens
Comma-separated CSVConverts comma-separated rows, including quoted commas in cells.
Semicolon-separated CSVCan be detected automatically or selected from the delimiter menu.
Tab-separated text / TSVConverts tabs as column separators, with the same header options.
Excel .xlsxNot supported directly. Export the worksheet to CSV before converting it here.
Files saved with another text encodingSome characters may look wrong. Save the CSV as UTF-8 text and try again.

CSV input is limited to 10 MiB (about 10.5 MB). The table preview displays up to 50 rows, while the JSON preview displays the first8,000 characters. These are preview limits: copying or downloading converted.json includes the full converted JSON result. Larger files may take longer to convert, depending on your device.

08

CSV to JSON vs JSON to CSV

These tools convert in opposite directions. Choose the format you need: renaming a CSV file to .json does not turn its contents into JSON.

FeatureCSV to JSONJSON to CSV
Starting dataCSV or TSV rowsJSON objects or arrays
DownloadA .json fileA .csv file
Headers and keysCSV headers become JSON property namesJSON properties become CSV column headers
Data typesStrings by default; optional type detectionCSV has no native JSON number or boolean types

Need the reverse conversion? Use JSON to CSVto turn JSON arrays and nested records into a downloadable CSV file. CSV cannot preserve every JSON data type or nested structure, so converting back and forth can change some values or fields.

09

Common CSV to JSON Problems

What you seeWhat to do
Unclosed quotation markCheck the reported line, and make sure every quoted field has a closing double quote.
Values appear in one columnOpen Conversion options and select the correct delimiter: comma, semicolon, or tab.
First data row is missingIf the file has no header row, turn off First row contains headers and convert again.
Column names have extra numbersRepeated or blank headings were renamed so no values are lost. Check the warning and JSON field names.
Some rows have fewer or extra cellsThe result keeps the rows, fills missing cells with empty strings, and adds columns for extra values. Check the table preview.
Numbers or IDs change formatTurn off Detect numbers and booleans to keep all CSV values as strings.
Characters look wrongSave the CSV as UTF-8 in the app where you created it, then upload the new file.
File is too largeSplit a file above 10 MiB (about 10.5 MB) into smaller CSV files and convert them separately.
FAQ

Frequently asked questions

How do I convert CSV to JSON online?

Paste CSV text or upload a .csv file, choose whether the first row contains headers, and click Convert CSV to JSON. Preview the JSON, then copy it or download converted.json.

Can I convert a CSV file to JSON?

Yes. Upload a .csv or .tsv file from your device. The converter reads and processes the file in your browser, then lets you copy or download the JSON result.

Is this CSV to JSON converter free?

Yes. You can convert CSV to JSON online for free without creating an account.

Does the first CSV row become JSON keys?

By default, the first row supplies the column names, and each later row becomes a JSON object using those names. If the CSV starts with data instead, turn off First row contains headers.

Can I convert CSV to JSON without headers?

Yes. Turn off First row contains headers. Every row, including the first, becomes a list of values in JSON. Try the example without headers to see the result.

Can I preserve leading zeros when converting CSV to JSON?

Yes. Values are kept as text by default, so IDs such as 00123 and postal codes such as 007 keep their leading zeros. Even with Detect numbers and booleans turned on, IDs with leading zeros stay as text.

Can the converter detect numbers and booleans?

Yes. Turn on Detect numbers and booleans to turn ordinary numbers and true/false into JSON numbers and booleans. Long numbers and values that could lose precision stay as text.

Can CSV to JSON handle commas, quotes, and line breaks inside fields?

Yes. Quoted fields can contain commas, escaped double quotes, and line breaks. The converter reads those characters as part of the same field instead of splitting the value into extra columns.

Which CSV separators are supported?

The converter can detect comma, semicolon, and tab-separated data automatically. You can also choose one of these separators manually if automatic detection does not match your file.

Is my CSV file uploaded to a server?

No. CSV text and files are processed in your browser. The contents of your CSV and the JSON result are not uploaded to our servers.

Why did my CSV column names change in JSON?

Repeated column names can cause one value to overwrite another when converting CSV to JSON. This tool keeps every column by adding names such as name_2. Blank headings receive numbered names such as column_3, and you'll see a warning.

What if some CSV rows have extra or missing cells?

All rows are included. Missing cells become empty strings, and extra values get their own columns. Check the warning and table preview before downloading JSON.

Can I upload an Excel .xlsx file?

No. This converter reads CSV and tab-separated text, not Excel workbook files. Export the worksheet as CSV first, then choose that file here.

What is the difference between CSV to JSON and JSON to CSV?

CSV to JSON creates a .json file from CSV rows. JSON to CSV creates a .csv file from JSON data. Choose JSON to CSV when you need the reverse conversion.