Skip to main content
OnlineTools

Runs locally in your browser

CSV to JSON Converter

Parse CSV or TSV records into JSON. Configure the delimiter and headers, preserve text IDs, or choose optional value conversion.

Have an .xlsx workbook with multiple sheets? Extract Excel data as JSON.

Conversion options

Values stay strings by default, preserving IDs and leading zeros. Optional conversion turns empty cells into null.

2 rows · 3 columns. Preview shows up to 20 rows; output includes all rows.

Converted data preview
idnameactive
1Alicetrue
2Bob, Jr.false

How to convert CSV to JSON

  1. Paste CSV or drop a UTF-8 CSV, TSV, or text file.
  2. Select the matching delimiter and choose whether the first row contains headers.
  3. Keep strings as-is or enable number, boolean, and empty-cell conversion.
  4. Review the JSON and table, then copy or download the result.

CSV to JSON example

With default settings, headers become keys and values remain strings, preserving identifiers such as 001.

id,name
001,Alice
002,"Bob, Jr."

[
  {"id":"001","name":"Alice"},
  {"id":"002","name":"Bob, Jr."}
]

Preserve identifiers when importing CSV records

CSV does not declare field types. Keep the default string mode for postal codes, product IDs, and decimal values that must retain their exact text. For example, 00124 stays a string rather than becoming 124.

Optional type conversion recognizes numeric values and lowercase true or false, and turns empty fields into null. Leading-zero values and integers outside the safe numeric range remain strings. Dates and nested JSON text are not parsed automatically.

Fix delimiter and header problems before exporting JSON

  • If the preview shows one combined column, select the separator used by your file. A .tsv import selects Tab automatically.
  • If your file has no headers, turn off the header option to keep the first record as data and generate column_1-style keys.
  • If a record has a different field count, check missing separators and quote fields containing embedded separators or line breaks.
  • If file import reports an encoding error, save the source as UTF-8. Changing the separator does not fix character encoding.

An XLSX workbook requires a different reader: use Excel to JSON to select its worksheet. To export records as delimited text again, use JSON to CSV.

Frequently asked questions

Does the CSV need a header row?

The first non-empty row is used as headers by default. Turn off the header option to generate column_1, column_2, and so on. Empty headers receive generated names, and duplicates receive suffixes so values are not overwritten. Header whitespace is preserved.

Are numbers and booleans converted automatically?

All values remain strings by default. Enable optional conversion for numbers, lowercase true and false, and empty cells as null. Leading-zero values and integers outside the safe numeric range remain strings. Dates and nested JSON text remain strings. Leave conversion off when exact numeric text or decimal precision matters.

Which CSV variants are supported?

Choose comma, semicolon, tab, or pipe. Quoted fields can contain delimiters, escaped double quotes, and line breaks. UTF-8 BOM and CRLF, LF, or CR record endings are accepted. Completely empty physical lines are skipped, while explicitly empty fields are retained.

Why does my CSV show an error?

Every data record must have the same field count as the header. Check your selected delimiter, missing fields, and unclosed quotes. Files must use UTF-8 encoding and be no larger than 10 MB, with up to 10,000 data rows and 200 columns.

Is my CSV uploaded?

No. CSV parsing, table previews, and JSON generation run in your browser. You can copy the result or download a JSON file.

Related tools