Skip to content

CSV to JSON

Convert CSV rows to a JSON array.

Runs in your browser · free · no sign-up

CSV
JSON

About the CSV to JSON

Paste a spreadsheet export and get a JSON array of objects that you can use in code or an API. Quoted values with commas and line breaks are handled correctly.

CSV is how spreadsheets, databases and many business systems export data, while JSON is what web apps, APIs and JavaScript code expect. Converting between them is a daily task for developers loading test data, analysts feeding a chart library and no-code users connecting services. Doing it reliably means handling quoted values that contain commas, line breaks inside cells and different delimiters.

Paste CSV and the tool parses it properly with these edge cases in mind. The delimiter is detected automatically, or you can choose comma, semicolon, tab or pipe. Output can be an array of objects using the header row as keys, or an array of arrays. Turn on number and boolean detection to get real JSON numbers and true/false values instead of strings.

How to use the CSV to JSON

  1. 1Paste CSV data (first row = column names).
  2. 2Choose the delimiter if it is not a comma.
  3. 3Copy or download the JSON.

Key features

  • Automatic or manual delimiter.
  • Quoted values with commas and line breaks.
  • Array of objects or arrays.
  • Header row option.
  • Number and boolean detection.

Practical uses

  • Turning a spreadsheet export into seed data.
  • Preparing data for a chart library.
  • Converting a product list for an API import.
  • Testing an API with realistic data.
  • Preparing a city or product list for a dropdown in a web form.

Example

The CSV header name,city,sales with the row Ayesha,Lahore,1200 becomes [{"name":"Ayesha","city":"Lahore","sales":1200}] with number detection on, or "1200" as a string with it off.

Tips and common mistakes

  • Keep detection off for IDs, phone numbers and postcodes with leading zeros.
  • Check header names; they become JSON keys.
  • Use semicolon for CSV from European Excel settings.
  • Remove empty trailing rows from spreadsheet exports so they do not become empty objects.

Limitations

  • Nested JSON is not created from flat CSV columns.
  • Very large files may be slow to paste.

Privacy

Your data is converted locally.

Frequently asked questions

Are numbers converted?

Tick "Detect numbers" to turn numeric values into JSON numbers. Otherwise all values stay strings.

Can I use semicolon-separated files?

Yes. Choose ";" as the delimiter. Many European Excel exports use it.

What if my CSV has no header row?

Turn off "First row is header" and columns are named column1, column2 and so on.

Can I upload a CSV file?

Open the file in a text editor or spreadsheet and copy its contents, then paste them here.

What does Array of arrays mean?

Each row becomes a list of values without keys, which is compact and suits charts and tables.

Related tools

JSON to CSVTurn a JSON array into a CSV file for Excel.
YAML to JSONConvert YAML to JSON and back.
JSON MinifierCompress JSON to a single line.
XML to JSON ConverterNewConvert XML to JSON and JSON to XML.