Home/Tools/Converters/CSV to JSON Converter

CSV to JSON Converter

Converters

Convert CSV data to JSON format.

⚡ Instant🔒 Private, in your browser🆓 Free, no sign-up👥 For everyone
Your data never leaves your browser. We do not store inputs.

What CSV to JSON Converter does

CSV to JSON Converter turns spreadsheet data into structured JSON, ready to use in an API, database, or application. Paste your CSV, choose the delimiter if needed, and get clean JSON output instantly.

FV
Reviewed by the FreeToolsVerse team · Last updated · How we check our tools

Features and benefits

  • Reads quoted fields correctly, including commas, doubled quotation marks and line breaks inside a field
  • Converts a column to numbers or booleans only when every value in it has that type, so ZIP codes and IDs with leading zeros stay as text
  • Supports comma, semicolon, tab and pipe delimiters
  • Shows how many rows were converted

How to use CSV to JSON Converter

  1. Paste your CSV into the input area (the first row is the column names), or open a .csv or .tsv file
  2. Choose the delimiter and whether numbers, true/false and null should be converted
  3. Click Convert to JSON
  4. Copy the JSON or download it as data.json

Who should use it

Made for everyone. Typical uses:

  • Turning a spreadsheet export into JSON for an API request
  • Converting CSV data for import into a database or app
  • Prepping tabular data for a developer who needs JSON

Example

The sample CSV with the header name,age,zip,active and the rows Ada,36,02134,true and "Sam, Jr.",41,90210,false gives two objects. The ages become numbers 36 and 41, active becomes true and false, and the zip values stay as the text "02134" and "90210".

Limitations and accuracy

Flat CSV produces flat JSON: a header such as address.city becomes a key with that name and is not rebuilt into a nested object. Dates stay as text, empty cells become empty strings instead of null, duplicate column names overwrite each other, and cells beyond the last header are ignored.

Accuracy: Conversions use well-known methods and are tested with real sample inputs. Check the output before you send or publish it.

Expert Tip

Switch off "Convert numbers, true/false and null" when you want every value kept exactly as written, for example before importing codes that must stay as strings.

Frequently asked questions

Does it support delimiters other than commas?
Yes. You can choose comma, semicolon, tab or pipe, which covers most spreadsheet and database exports.
Does the first row need to be a header?
Yes. The first row becomes the keys of every object, and the tool needs at least one data row below it. A blank header cell is named column1, column2 and so on.
What happens to numbers and ZIP codes?
A column is converted only when every non-empty value has the same type. A column that mixes text and numbers, such as ZIP codes where some have a leading zero, stays as text. You can also turn conversion off.
What if a cell contains a comma?
Properly quoted CSV fields, wrapped in double quotation marks, are handled correctly even if they contain the delimiter, a doubled quotation mark or a line break.
Is my data uploaded anywhere?
No. The conversion happens locally in your browser.

CSV to JSON Converter: the complete guide

What the converter does

The CSV to JSON Converter reads comma-separated text, with the first row as column names, and produces a JSON array with one object per data row. You paste the CSV or open a .csv or .tsv file, choose the delimiter, and press Convert to JSON. The output heading tells you how many rows were converted, and you can copy the result or download it as data.json. The conversion happens in your browser, so the data is not uploaded.

A worked example

The Try an example button loads a header row of name, age, zip and active, followed by Ada, 36, 02134, true and then "Sam, Jr.", 41, 90210, false. The result is an array of two objects.

  • name: "Ada" and "Sam, Jr." are text. The comma in the second name is protected by quotation marks in the CSV.
  • age: 36 and 41 become real numbers, because every value in the column is a number.
  • zip: "02134" and "90210" stay as text. The first has a leading zero, so the column mixes text and numbers and nothing is converted. No digit is lost.
  • active: true and false become real booleans.

How values get their type

The "Convert numbers, true/false and null" option works column by column. A column is converted only when every non-empty value in it has the same type. If it is all numbers, they become numbers. If it is all true and false, they become booleans. If any value is different, such as a ZIP code with a leading zero, the whole column stays as text, so a column never ends up holding a mix of strings and numbers. Empty cells become empty strings, not null. Numbers with 16 or more characters stay as text to avoid rounding. Untick the option and every value is kept exactly as written.

Headers, delimiters and quoting

The first row becomes the keys of every object. A blank header cell is named column1, column2 and so on by position. If two columns share a name, the later one overwrites the earlier one, so rename duplicates before converting. The delimiter can be a comma, semicolon, tab or pipe, which covers most exports from spreadsheets and databases. Quoted fields may contain delimiters, doubled quotation marks and even line breaks, and a byte-order mark at the start of a file is removed. A row with fewer cells than headers gets empty strings, and cells beyond the last header are ignored.

Errors you may see

The tool needs a header row and at least one data row, and it says so when there is only one line. If a quoted field never closes, it reports that, which usually means a stray quotation mark. After conversion, the output goes straight into the JSON Formatter if you want a different indent or compact output, or into the JSON Validator if you want to double-check it.

What it does not do

Flat CSV produces flat JSON. A column called address.city becomes a key named "address.city" and is not rebuilt into a nested object. Dates stay as text, because JSON has no date type. If your target system expects a particular structure, reshape the output afterwards. To go back to a spreadsheet, use the JSON to CSV Converter, and if the JSON you produce is rejected by an API, the guide to common JSON errors explains the usual causes.

Learning resources

Explore more in Converters, read the guides and articles, or see how we test our tools.

Share This Tool