Skip to content

CSV to JSON Converter — Convert Spreadsheet Data to JSON

Free

Convert CSV files to JSON instantly in your browser. Configurable delimiter, header row, and type inference. Free, no upload, processes locally.

csv to json onlineconvert csv to json freecsv to json array
All Developer Tools

Settings guide

Delimiter:

  • ·Comma (,) — Standard CSV. Used by Excel, Google Sheets, and most export tools.
  • ·Semicolon (;) — Common in European locales where commas are used as decimal separators.
  • ·Tab (\t) — TSV format. Common in database exports and some analytics tools.

Options:

  • ·Header row — First row is treated as column names (object keys). Disable if your CSV has no header row — numeric indexes are used instead.
  • ·Type inference — Automatically converts numeric strings to numbers and "true"/"false" to booleans. Disable to keep all values as strings.
  • ·Output format — Array of objects (one per row) or array of arrays (raw rows without key names).

Format comparison

CSV to JSON vs Excel to JSON: CSV is the universal interchange format — any spreadsheet tool can export CSV. Excel's native .xlsx format requires a more complex parser. If you have an Excel file, export it as CSV first (File → Save As → CSV), then convert here.

Online converter vs code: Papa Parse (browser/Node.js) and Python's csv module handle CSV-to-JSON programmatically for large files or automated pipelines. The online tool is faster for one-off conversions and data inspection without writing code.

How it works

1

Parse delimiter and quotes

The CSV is scanned for the delimiter character. Quoted fields (which may contain commas or newlines) are correctly handled — the content inside quotes is treated as a single value regardless of delimiters inside.

2

Extract headers

If the header row option is enabled, the first row's values become the JSON object keys. Whitespace is trimmed from key names.

3

Infer types

Each cell value is tested: numeric strings are converted to numbers, 'true' and 'false' become booleans, empty cells become null. String values are left as strings.

4

Build JSON array

Each subsequent row becomes a JSON object with header names as keys and cell values as values. The result is a JSON array of objects, ready to paste or download.

About this format

CSV is how data leaves spreadsheets, databases, and reporting tools. JSON is what web APIs, JavaScript applications, and modern data pipelines consume. Converting between them is a daily task for developers working with data exports, ETL pipelines, or seeding databases.

Paste CSV text or upload a .csv file — the converter reads your headers, infers column types (numbers stay numbers, booleans become `true`/`false`, empty cells become `null`), and produces a JSON array where each object is a row. The output is formatted and ready to copy directly into your application.

Frequently asked questions

What JSON structure does the converter produce?+
An array of objects by default: [{"column1": "value", "column2": 42}, ...]. Each row becomes an object. Each column header becomes a key. If you disable the header row option, the output is an array of arrays: [["value", 42], ...].
How are empty cells handled?+
Empty cells become JSON null by default. If you disable type inference, empty cells become empty strings (""). This is configurable — some use cases need null, others need an empty string to distinguish from missing fields.
My CSV has quoted fields with commas inside — will it parse correctly?+
Yes. Quoted fields are fully supported. A field like "Smith, John" is treated as a single value containing the comma. Escaped double quotes inside quoted fields ("") are also handled correctly.
What is the maximum CSV file size I can convert?+
The conversion runs entirely in your browser with no server upload. Files up to 50MB convert without issue on modern devices. Larger files may slow the browser but will still process correctly.
Can I convert a CSV with special characters or non-English text?+
Yes, provided the file is UTF-8 encoded. If your CSV was exported from an older tool in Windows-1252 or Latin-1 encoding, some characters may appear incorrectly. Re-save the CSV as UTF-8 in your spreadsheet tool first.

Related tools and guides