CSV to JSON Converter

Convert CSV data into JSON.

Free online CSV to JSON converter

This CSV to JSON converter turns comma-, semicolon-, or tab-separated data into clean JSON right in your browser. Paste a spreadsheet export or any delimited text and it is converted live — with a real CSV parser that correctly handles quoted values, delimiters and line breaks inside quotes, and escaped double quotes. Choose a header row to get an array of objects, or turn it off for a raw array of arrays.

How to convert CSV to JSON

  1. Paste or type your CSV into the input box on the left.
  2. Select the delimiter your file uses — comma, semicolon, or tab.
  3. Keep First row is header on to key each row by its column name.
  4. Toggle Pretty print for indented JSON, or off for a single line.
  5. Click Copy JSON to grab the result, or Clear to start over.

Objects vs. arrays

With a header row, each record becomes an object such as { "name": "Smith, John", "age": "42" }, which is ideal for APIs and JavaScript. Without a header, every row stays a simple array of strings that mirrors the original grid. Ragged rows are handled gracefully: missing cells become empty strings and extra cells are ignored.

Going the other way

Need to reverse the process? Use the JSON to CSV converter to turn an array of objects back into a spreadsheet-ready file. If your JSON looks messy after converting, tidy it up with the JSON formatter. Everything runs locally, so your data never leaves your device.

Frequently asked questions

How do I convert CSV to JSON?

Paste or type your CSV into the input box and the JSON appears instantly on the right. Pick the delimiter your file uses, choose whether the first row is a header, and toggle pretty-print on or off. Everything converts live as you type — there is no button to press.

Does it handle commas and line breaks inside quoted fields?

Yes. This converter uses a proper CSV parser rather than a naive split, so a value wrapped in double quotes can safely contain commas, semicolons, tabs, and even line breaks. Two double quotes inside a quoted field ("") are correctly read as a single literal quote character.

What is the difference between the header and no-header modes?

With "First row is header" on, each remaining row becomes a JSON object whose keys come from the first row — the most common format for spreadsheets. With it off, every row is emitted as a plain array of strings, preserving the raw grid exactly as written.

What happens if some rows have more or fewer columns?

Ragged rows are handled gracefully. Missing cells are filled with an empty string so every object keeps the full set of header keys, while any extra cells beyond the header are ignored. Blank header cells fall back to keys like column_2.

Is my CSV data uploaded anywhere?

No. All parsing and conversion run entirely in your browser with JavaScript. Your data is never sent to a server, stored, or logged, so it is safe to convert private exports, customer lists, and confidential spreadsheets.