Use Everyday Tools

TEXT & DEVELOPER TOOLS

CSV to JSON

Convert CSV data into JSON as an array of objects, arrays or JSON Lines, with automatic delimiter detection.

Quick answer: Paste or open your CSV, keep the conversion on CSV → JSON, pick the JSON shape and indentation, convert, then copy or download the result.

Use CSV to JSON ↓
← Browse all tools

Loading the tool…

How to use CSV to JSON

  1. Paste or open the CSVUse the text box or open a file. The first row is treated as the column names.
  2. Pick delimiter and shapeLeave the delimiter on automatic detection or choose comma, semicolon, tab or pipe. Choose an array of objects, arrays, JSON Lines or an object keyed by the first column.
  3. Check the optionsBy default the first row is used as headers, numbers, true/false and empty cells are converted, spaces are trimmed and blank lines are skipped. Untick an option if you need values kept exactly as written. Choose the JSON indentation; “Minified” gives the smallest output.
  4. Convert and checkCompare a few rows of the output with the source before using it.

About this tool

Spreadsheets and exports give you CSV; applications and APIs want JSON. Turning one into the other sounds trivial until you meet quoted commas, line breaks inside cells, semicolon-separated files from European locales and empty fields. This page converts CSV to JSON in your browser and handles those cases, so private data never leaves your machine.

Practical example: Paste a product export with commas inside quoted descriptions and choose an array of objects with two-space indentation.

Important limitation: CSV carries no data types, so check how numbers and IDs came out. A malformed file with unbalanced quotes may not convert cleanly.

Parsing and conversion run in this browser tab. Your data is not uploaded. Read the privacy information.

How it works

The tool parses the CSV with quote handling, maps rows to the chosen JSON shape and prints formatted JSON.

Real-world uses

Getting a clean CSV to JSON conversion

The shape decides how useful the JSON is. An array of objects, where each row becomes an object keyed by the column names, is the most common and the easiest for applications to read. An array of arrays is more compact when the header is not needed. JSON Lines puts one object per line, which suits large datasets and logging tools. An object keyed by the first column gives you fast lookup by ID.

Check the delimiter. Files exported from spreadsheets in many countries use semicolons because the comma is the decimal separator. If everything ends up in a single column, choose the right delimiter instead of relying on detection. Quoted fields can contain commas and line breaks; they are handled as long as the quotes are balanced.

Pay attention to data types. CSV has no types, so the tool offers to convert numbers, true/false and empty cells, and that option is on by default. It is convenient for most data, but untick it when values such as postcodes, phone numbers or IDs with leading zeros must stay exactly as written. Dates and long numbers may also have been changed by the spreadsheet before the export, so review a few rows of the output.

Validate the output where it matters. If JSON will feed an API or a database import, run a sample first and confirm that field names match what is expected, because small differences in header spelling or spaces cause silent failures.

Tips for better results

Frequently asked questions

What happens to the header row?

It is used as the key names for each object when you choose an array of objects.

Can it handle semicolon or tab separated files?

Yes. Leave detection on automatic or choose the delimiter.

Will numbers become numbers?

By default yes: numbers, true/false and empty cells are converted. Untick “Convert numbers, true/false and empty cells” to keep everything as text, for example for IDs with leading zeros.

Is my data uploaded?

No. The conversion happens in this browser tab.