Skip to content
FormatMyCSV
Runs in your browser · Files are never uploaded

Convert CSV to JSON

Convert CSV rows into JSON objects using the header row as the keys.

Workspace

CSVJSON

Input data

or drop a CSV or TSV file here

Options

Cleanup options
Advanced options

Use column numbers starting at 1. Omitted columns are deleted.

Enter comma-separated names in output order. Leave positions blank to keep their names.

Preview

Your rows and columns will appear here.

How to convert CSV to JSON

  1. Choose or paste a CSV and confirm the separator.
  2. Set First row to Use as header for JSON objects, or Keep as data for an array of arrays.
  3. Select Download JSON or copy the result to your clipboard.

How to Create a CSV File

Example

sku,item,stock
00421,Notebook,12
00017,Pen,30

With the header enabled, the first row becomes an object with sku, item, and stock keys. The SKU remains a string.

Frequently asked questions

What is a CSV file in Excel?

A CSV is text that Excel shows as a grid. Its first row may contain column labels, which this converter can use as JSON object keys. Look at that row before converting to make sure an actual record, such as the first entry in a headerless export, stays in the output.

Is CSV the same as XLS?

No. CSV holds a text table, while XLS can contain multiple worksheets with typed cells. This converter reads delimited text. For a workbook that is already in XLS or XLSX format, use Excel to JSON to convert its first worksheet without first making a CSV.

What type of CSV to use?

Use UTF-8 CSV with a single header row if you want JSON objects with readable keys. Keep column names unique so downstream code can identify fields easily. If the file uses a semicolon or tab, verify the delimiter in the preview so each record becomes the expected values.

How do I convert CSV to JSON objects?

Choose Use as header so the column names become keys, then select Download JSON. One object is created per data row. For headerless data, choose Keep as data to produce arrays of values. The conversion runs in your browser and your CSV file is never uploaded.

Does CSV to JSON convert numbers or booleans automatically?

No. CSV values become JSON strings. That preserves the original representation of values such as 00017, 12.00, and TRUE. If the receiving app needs numbers or booleans, convert only the relevant fields after import. Identifier columns can then keep their leading zeros or long digit sequences.

What if CSV column headers repeat or are blank?

Repeated header names get numeric suffixes so each JSON object can contain every value. Blank header cells get labels based on column position. If an app expects a fixed set of keys, enter the names you need under Rename columns and check the preview before exporting.