Skip to converter
{ } CSV to JSON

Runs locally · No uploads · No sign-up

CSV to JSON Free Online CSV to JSON Converter

Last updated:

100% Free, Secure & Browser-Based CSV to JSON Converter & Data Formatter.

CSV to JSON is a free online tool that converts CSV files and pasted CSV text into formatted JSON. It supports comma, tab, semicolon and pipe delimiters, header rows, 2-space, 4-space or minified output, automatic number, boolean and null parsing, and RFC 4180 quoted fields. All parsing happens locally in your browser — files are never uploaded.

JSON indent
More options

CSV Input

Drag & drop a CSV file here

…or click inside and paste raw CSV text

.csv · .tsv · .txt — processed locally, never uploaded

Ready

JSON Output

// JSON output will appear here as you type…
—
Advertisement

How to convert CSV to JSON online

CSV to JSON turns spreadsheet-style comma-separated values into clean, standards-compliant JSON in three steps — with no software to install and no file uploads.

  1. 01

    Add your CSV

    Drag & drop a .csv or .tsv file, open it from your device, or paste raw CSV text straight into the input pane.

  2. 02

    Tune the options

    Pick a delimiter, toggle the header row, choose 2-space, 4-space or minified output and enable automatic type parsing.

  3. 03

    Copy or download

    Review the highlighted live preview, fix any flagged rows, then copy the JSON or download it as a .json file.

What is CSV to JSON conversion?

CSV (Comma-Separated Values) is a flat, tabular text format exported by Excel, Google Sheets, databases and analytics tools. JSON (JavaScript Object Notation) is the structured data format used by web APIs, JavaScript apps, NoSQL databases and configuration files. Converting CSV to JSON maps each row to a JSON object whose keys come from the header row, so tabular data can be consumed directly by code.

Example

id,name,active
1,"Smith, Jane",true
2,Leo,false
[
  { "id": 1,
    "name": "Smith, Jane",
    "active": true },
  …
]

Why use CSV to JSON?

  • ✓Robust RFC 4180 parser — quoted cells, commas and line breaks inside cells, and escaped "" quotes.
  • ✓Live validation — warns about unclosed quotes, rows with too many or too few fields, and blank or duplicate headers.
  • ✓Smart type parsing — numbers, booleans and null become native JSON types, while ZIP codes and IDs with leading zeros stay strings.
  • ✓Nested output — headers like address.city can become nested JSON objects.
  • ✓Private by design — everything happens in your browser; your data never leaves your device.

Frequently asked questions

How do I convert a CSV file to JSON format online?

▾

Drag and drop your .csv file onto the upload zone (or paste raw CSV into the input box). CSV to JSON parses it instantly and shows the JSON in the live preview pane. Choose your delimiter, header and indentation options, then click Copy JSON or Download .json File.

Are my uploaded CSV data files private and secure?

▾

Yes. CSV to JSON runs 100% in your web browser using JavaScript. Your CSV file is read locally with the FileReader API and is never uploaded to any server, logged or stored. It even keeps working offline once the page has loaded.

How does the converter handle commas inside text cells?

▾

The parser follows RFC 4180. Any cell wrapped in double quotes can contain commas, delimiters and even line breaks, and a doubled quote ("") inside a quoted cell becomes a literal quote character. For example "Smith, John" stays a single value.

Can it convert numbers and booleans to real JSON types?

▾

Yes. With Auto-parse types enabled, unquoted values like 42, -3.14 and 1e5 become JSON numbers, true/false become booleans and null becomes null. Values with leading zeros such as ZIP codes stay strings, and quoted values are always kept as strings.

What if my CSV has no header row?

▾

Turn off First row is headers. Each row is then output as objects with generated keys (column_1, column_2, …) or as plain arrays, depending on the Output structure setting.

Does it support TSV, semicolon or pipe-delimited files?

▾

Yes. Choose Comma, Tab, Semicolon or Pipe from the delimiter menu, or leave it on Auto-detect and CSV to JSON will pick the most likely delimiter from the first lines of your data.

Are all the tools on FreeToolCabin tested for quality and accuracy?▾

Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.

More free data & developer tools

Browser-based utilities from the same family — fast, private and free.

Choosing an output structure

The same two-row CSV sku,price / A1,9.5 / B2,12 comes out differently depending on the Output structure setting:

StructureResultGood for
Array of objects[{"sku":"A1","price":9.5},{"sku":"B2","price":12}]Most APIs, JavaScript apps and NoSQL imports
Array of arraysEach row as a plain list, such as ["A1",9.5], with no key names repeatedCharting libraries, compact storage, data without stable headers
Object keyed by 1st columnOne object whose keys are "A1" and "B2", each holding that row's dataLookup tables where code fetches a row by ID

For the keyed option, make sure the first column holds unique values. If two rows share the same key, a JSON object can only keep one of them.

With Nest dot.notation keys turned on, headers such as address.city and address.zip become one nested address object with city and zip inside, which matches how many APIs expect addresses and settings.

Spreadsheet export problems to watch for

If your data is still an .xlsx workbook, export a clean sheet first with Excel to CSV.

Reading the validation warnings

A row with too many fields almost always contains an unquoted delimiter, such as Smith, Jane without quotes, which splits one name into two cells. A row with too few fields often means a line break inside a cell that was not quoted, so one record was cut into two lines. Duplicate headers matter because JSON keys must be unique within an object; rename the columns, for example phone_home and phone_work, before converting. To go back the other way later, use JSON to CSV.

More questions about CSV to JSON

Why did my JSON numbers turn into strings?

Quoted values in the CSV are always kept as strings, and so are numbers with leading zeros. Check whether your export tool wrapped every field in quotes, or turn on Auto-parse types if it is off.

Can I open an .xlsx file directly?

No. The converter reads .csv, .tsv and .txt text files. Save or export the sheet as CSV from your spreadsheet program first, one sheet at a time, then load that file here.

Is minified or indented JSON better?

Indented JSON is easier to read and review in diffs. Minified JSON is smaller, which helps when you embed it in code or send it over a network; the data is identical either way.