CSV to JSON Converter Online Free — Convert CSV ↔ JSON Instantly

Convert CSV to JSON or JSON to CSV with custom delimiters and header options. Fast bidirectional converter that works entirely in your browser.

  • Bidirectional conversion
  • Custom delimiters
  • No server uploads
  • Download results
JSON Output
[
  {
    "name": "John Doe",
    "email": "john@example.com",
    "age": "30"
  },
  {
    "name": "Jane Smith",
    "email": "jane@example.com",
    "age": "25"
  }
]
CSV to JSON Conversion Tips

This tool converts between CSV (Comma-Separated Values) and JSON (JavaScript Object Notation) formats. All processing happens in your browser - no data is sent to any server.

  • CSV to JSON: Converts CSV rows to JSON array of objects (with headers) or array of arrays (without headers)
  • JSON to CSV: Converts JSON array of objects to CSV with headers, or array of arrays to CSV rows
  • Custom delimiters: Choose comma, semicolon, tab, or pipe as separator
  • Header detection: Toggle whether first CSV row contains column names
  • Special characters: Values containing delimiters or newlines are automatically quoted

About the CSV to JSON Converter

Convert a spreadsheet export into a JSON array for an API, fixture or script, or flatten a JSON array of objects into CSV for Excel or Google Sheets. Quoted fields are handled properly, so a value like "Desk lamp, brass" stays in one column and doubled quotes become a single quote. Choose comma, semicolon, tab or pipe delimiters, and turn off First row is header to get arrays instead of objects.

How to use the CSV to JSON Converter

  1. Click CSV → JSON or JSON → CSV, or use Upload CSV/JSON to load a file and pick the mode automatically.
  2. Paste or edit your data in the input box, or click Load Example to see the expected shape.
  3. Set Delimiter to match your file. For CSV input, tick or untick First row is header.
  4. Review the output, then click Copy or Download (saved as output.json or output.csv).

Worked example: a product export with commas and quotes inside values

Both name values contain characters that would break a naive split. Notice that every value comes out as a string, including 34.50 and true. CSV has no types, so convert numbers and booleans in your code.

CSV Input
sku,name,price,in_stock
A-100,"Desk lamp, brass",34.50,true
A-101,"Mug ""Good Morning""",12,false
JSON Output
[
  {
    "sku": "A-100",
    "name": "Desk lamp, brass",
    "price": "34.50",
    "in_stock": "true"
  },
  {
    "sku": "A-101",
    "name": "Mug \"Good Morning\"",
    "price": "12",
    "in_stock": "false"
  }
]

JSON to CSV: what to flatten first

JSON → CSV builds its columns from the keys of the first object only, and writes each value as plain text. With this input, the note key that appears only in the second object is dropped, the tags array becomes a,b in quotes, and the meta object becomes the literal text [object Object]:

  • Input: [{"id":1,"city":"Austin, TX","tags":["a","b"],"meta":{"x":1}},{"id":2,"city":"Lyon","note":"extra"}]
  • Output line 1: id,city,tags,meta
  • Output line 2: 1,"Austin, TX","a,b",[object Object]
  • Output line 3: 2,Lyon,,
  • Fix: run nested data through the JSON flattener first so meta.x becomes its own column, and make sure the first object contains every key you need.
  • European spreadsheets often expect a semicolon delimiter. With Semicolon selected, Austin, TX no longer needs quotes and the row becomes 1;Austin, TX.

Why convert between CSV and JSON

CSV (Comma-Separated Values) is the universal format for spreadsheet data exports, database dumps, and data analysis tools. JSON (JavaScript Object Notation) is the standard for web APIs, configuration files, and JavaScript applications. Converting between them is a daily task for developers and data analysts.

APIs often return JSON that needs to be imported into Excel or Google Sheets, requiring CSV format. Conversely, data exported from spreadsheets as CSV needs to be converted to JSON for web applications or API requests. Bidirectional conversion eliminates manual reformatting.

Understanding CSV delimiters

While called "Comma-Separated," CSV files can use different delimiters. Semicolons are common in European locales where commas are decimal separators. Tab-separated files (TSV) are popular for data interchange because tabs rarely appear in text fields.

Pipe delimiters (|) are often used when comma and semicolon appear in the data itself. This converter auto-detects and handles quoted fields containing the delimiter character, preventing incorrect column splits.

CSV header row considerations

CSV files may or may not have a header row. Files exported from databases typically include column names as the first row. Spreadsheet exports might have headers, title rows, or start directly with data.

When converting CSV with headers to JSON, each row becomes an object with header names as keys. Without headers, rows become arrays of values. Choose the right mode based on your source file structure and desired JSON format.

CSV to JSON Converter: frequently asked questions

What delimiters are supported?
Comma (,), semicolon (;), tab (\t), and pipe (|) delimiters. Choose the delimiter that matches your CSV file format. For tab-separated files, replace the tabs with commas first.
Does CSV to JSON preserve data types?
CSV has no native data types-everything is text. The converter preserves values as strings. You will need to parse numbers, booleans, and dates in your code after conversion.
How does header detection work?
With "First row is header" enabled, the first CSV row becomes JSON object keys. Without it, each CSV row becomes a JSON array. Toggle this option based on whether your CSV has column names in the first row.
Is my data uploaded to servers?
No. All conversion happens in your browser with JavaScript. CSV and JSON data never leaves your device.