CSV to JSON Converter

Convert CSV data to JSON format instantly. Preview as table. Also supports JSON to CSV.

How to use

  • Paste your CSV data into the input box, or click Load Sample to try an example.
  • Choose the delimiter that your CSV uses (comma, semicolon, tab, or pipe).
  • Check First row is header to use column names as JSON keys.
  • Click Convert to generate JSON. A table preview shows the first 10 rows.
  • Switch to JSON → CSV tab to reverse the conversion.
  • Copy the output or download it as a file.

About this CSV to JSON Converter

CSV (comma-separated values) stores data as flat rows and columns, ideal for spreadsheets. JSON stores data as nested key-value structures, ideal for APIs and web applications. Converting between them is a routine step when moving spreadsheet data into code.

How the conversion works

The first row of a CSV file is typically treated as column headers, which become the key names in each resulting JSON object. Each subsequent row becomes one JSON object, with each column value assigned to its corresponding header key. The result is an array of objects, one per data row.

Worked example

A CSV with header "name,age" and one row "Alex,30" converts to [{"name":"Alex","age":"30"}] — a JSON array containing one object per row, with headers as keys.

Common pitfalls

  • Commas inside a field: a value like "Smith, John" needs to be quoted in the CSV, or the extra comma will be misread as a new column
  • Missing values: a row with fewer columns than the header row can produce incomplete or misaligned JSON objects
  • Data types: CSV values are plain text by default, so numbers and booleans may need to be explicitly converted from strings in the resulting JSON depending on how they'll be used