go-supertools
Developer & Data Tools

CSV to JSON

Convert CSV or TSV with a header row into a JSON array of objects.

Runs in your browser Your input never leaves your device.

0 characters | 0 words

About this tool

Paste CSV (or TSV, using the delimiter option) and get a JSON array with one object per row. The first row is treated as the headers and supplies the keys. The parser understands quoted fields, so commas, doubled quotes and line breaks inside quotes are handled correctly. All values come out as strings; the tool does not turn "36" into the number 36. Rows shorter than the header get empty strings for the missing fields. Everything is converted in your browser and your data is not uploaded.

How to use it

  1. Paste your data with the header row first.
  2. Choose Comma (CSV) or Tab (TSV).
  3. Read the JSON in the output.
  4. Press Copy to use it.

Example

Numbers stay as strings.

Input
name,age
Ada,36
"Lin, Jr.",29
Result
[
  {
    "name": "Ada",
    "age": "36"
  },
  {
    "name": "Lin, Jr.",
    "age": "29"
  }
]

Common problems

Fields are split in the wrong place
The delimiter does not match. Switch between Comma and Tab, and wrap fields that contain the delimiter in double quotes.
Numbers and booleans are strings
All values are kept as text. Convert types in your own code after import.
Semicolon-separated files do not split
Only comma and tab are supported. Replace semicolons with commas first.