Skip to content

CSV to JSON

Convert CSV to JSON array.

Loading…

About CSV to JSON

A spreadsheet export is fine for people and awkward for code. Paste the CSV with its header row on top and you get an array of objects, one per line, with the headers as keys and two-space indentation. Fields in double quotes may contain commas, doubled quotes and line breaks. Every value is kept as text, so ZIP codes and IDs that start with zeros survive. All of it happens in your browser.

Features

  • First row becomes the keys and each later row an object
  • Quoted fields may contain commas, doubled quotes and line breaks
  • Duplicate column names get _1, _2 suffixes instead of overwriting each other
  • Missing cells become empty strings
  • Reads a byte order mark, Windows line endings and blank lines
  • Values stay as text, so zeros at the start of an ID are kept

Limitations

  • Only commas separate fields; text that uses semicolons or tabs ends up in a single column.
  • Every value is a string: 30 becomes "30", true becomes "true" and an empty cell becomes an empty string.
  • Cells beyond the number of headers are dropped, and at least a header row plus one data row is required.
  • Download saves the text as output.txt and needs a free account; Copy Output does not.

How it works

  1. Paste CSV with a header row into the CSV Input panel.
  2. Select Convert to JSON.
  3. Read the array of objects in the JSON Output panel.
  4. Use Copy Output to copy it, or Download to save it.
  5. Press Clear All to load another file.

Example input

name,role
Auro,admin
Nova,editor

Frequently asked questions