Convert between CSV and JSON

Header-row CSV to a JSON array, and back.

Files stay on your device. No accounts. Free.

Loading tool...

About this tool

CSV with a header row becomes a JSON array of objects; a JSON array of objects becomes properly quoted CSV. Embedded commas, quotes and line breaks inside fields are handled correctly in both directions.

The standard bridge between spreadsheets and code: export from Excel or Sheets, convert here, feed to your script, or the reverse. Your data is parsed locally and never leaves your browser.

How it works

  1. Paste your input, or drop a text file onto the box.
  2. The output updates live as you type.
  3. Copy it to the clipboard, or download it as a file.

Frequently asked questions

How does the tool know my column names?

The first CSV row is treated as the header, and each following row becomes a JSON object using those headers as keys. Going the other way, the keys of your JSON objects become the header row.

What about commas and quotes inside my data?

Fields containing commas, quotes or line breaks are handled with proper CSV quoting in both directions, the cases that break naive converters are exactly what this one is tested on.

Can I convert an Excel or Google Sheets file?

Export the sheet as CSV first, which both apps do natively, then drop the CSV here. The JSON comes out ready for your script or API.

Related tools

Missing something? Suggest a feature →