Toolstia / CSV to JSON converter

CSV to JSON and JSON to CSV converter

Paste a CSV table to get a JSON array, or paste a JSON array to get a CSV table. It handles quoted fields, commas inside values, line breaks inside quotes, and files that use semicolons or tabs.

Options

Everything is converted in your browser. Values with leading zeros, such as 007, stay as text.

How it works

  1. Choose the direction.
  2. Paste your data, or press Use sample.
  3. Copy the result or download it as a file.

CSV to JSON

The first row becomes the keys, and each later row becomes an object. The separator is detected automatically, or you can choose it. Numbers and true/false can be turned into real values. Values with leading zeros, such as 007 or a phone number, stay as text so nothing is lost.

JSON to CSV

Give it an array of objects. The columns are every key found in any object, so rows with missing keys get empty cells. Nested objects and arrays are written as JSON text inside the cell.

Quotes and special characters

Values that contain the separator, a quote or a line break are wrapped in quotes, and quotes inside them are doubled, which is what Excel and Google Sheets expect.

Excel files

This tool reads text. To use an Excel file, save it as CSV first (File, then Save As, then CSV).

Questions

Is my data uploaded?

No. It is converted in your browser.

Why is a number still shown with quotes?

Values with leading zeros, spaces or letters are kept as text on purpose.

Does it work with semicolons?

Yes. Many European spreadsheets use semicolons, and the tool detects them.

How large a file can it handle?

Several megabytes is fine on most computers. Very large files are better handled with a spreadsheet or a script.