CSV to JSON Converter

Convert CSV to JSON online in one click. Paste your CSV data below, set delimiter and whether the first row is headers, then get valid JSON. All processing runs in your browser for speed and privacy.

How to convert CSV to JSON

  1. Paste your CSV data into the input box. The first line can be headers (column names) or data.
  2. Set Delimiter to match your data: Comma, Tab, or Semicolon. Most spreadsheets use comma.
  3. Check First row as headers if the first line contains column names; the output will be an array of objects with those keys. Uncheck it if the first row is data (you get an array of arrays).
  4. Click Convert to JSON. Valid JSON appears in the output box. Use Copy to clipboard to paste it elsewhere.

Conversion runs in your browser. Your data is not uploaded to any server. If you see an error, check that the delimiter matches your CSV and that the structure is consistent (same number of columns per row when using headers).

Example

With First row as headers checked, this CSV:

name,age,city
Alice,30,NYC
Bob,25,LA

becomes an array of objects:

[
  { "name": "Alice", "age": "30", "city": "NYC" },
  { "name": "Bob", "age": "25", "city": "LA" }
]

With the box unchecked, you get an array of arrays instead, one inner array per row, with the header line treated as ordinary data.

How the conversion behaves

  • All values come out as text. The number 30 becomes the string "30". If your application expects real numbers or true/false values, convert those fields after pasting the JSON in.
  • Quoted fields are supported. A value wrapped in double quotes can contain the delimiter or even a line break, for example "Smith, John". A doubled quote inside a quoted value ("") becomes a single quote character.
  • Spaces around values are trimmed, and completely empty lines are skipped.
  • Header mode checks consistency. Every row must have the same number of columns as the header row. If one does not, the tool tells you which row is wrong instead of producing misleading output.
  • Size limit. Input up to about 2 MB can be converted, which is plenty for most exports.

Common uses

  • Turning a spreadsheet export into data an API or a JavaScript app can read.
  • Creating test fixtures or seed data from a table.
  • Inspecting a CSV file as structured data to spot inconsistent rows.

Troubleshooting and FAQ

I get "Unclosed quoted field". What does it mean?
A value opened with a double quote but never closed it. Look near the line number shown and add the missing closing quote.
My output has everything in one column. Why?
The delimiter setting probably does not match your file. European spreadsheets often use semicolons, and exports from some tools use tabs.
Is my data uploaded?
No. The conversion runs in your browser, so your data never leaves your device.
How do I convert JSON back to CSV?
Use the JSON to CSV converter.