💻 Developer Tools

CSV ⇄ JSON Converter

Convert CSV/TSV to a JSON array and JSON back to CSV. Choose whether the first row is a header and pick a delimiter. Quoted values, and commas or line breaks inside a value, are handled correctly. Everything runs in your browser, so your input stays with you.

Examples (click to try)
(Enter CSV to see the result here)

How to Use the CSV ⇄ JSON Converter

Paste CSV (or JSON) into the text area and the result appears instantly. Use the segment buttons to switch the direction of conversion.

  • CSV→JSON: Reads CSV/TSV and converts it to JSON. With First row is a header enabled, the output is an array of objects; disabled, it is an array of arrays. The JSON is pretty-printed with 2-space indentation.
  • JSON→CSV: Expects an array of objects. The union of all keys becomes the header row. Any value containing a comma, line break, or double quote is wrapped in double quotes automatically.
  • Delimiter: Pick comma (CSV) or tab (TSV). Tables copied from Excel or a spreadsheet are usually tab-separated.
  • Sample: Loads example data so you can see how it works.

Worked Example: CSV→JSON

For example, paste this CSV (with First row is a header enabled):

name,age,city
John Smith,34,Tokyo
Jane Doe,29,Osaka

and it converts to this JSON (an array of objects):

[
  { "name": "John Smith", "age": "34", "city": "Tokyo" },
  { "name": "Jane Doe", "age": "29", "city": "Osaka" }
]

The header row (name,age,city) becomes the keys of each object, and every following row becomes one object. Values are kept as strings.

Handy When You Need To…

  • Turn a table copied from a spreadsheet into a JSON array for an API
  • Write a JSON response from an API out as a CSV you can open in Excel
  • Move master data or test fixtures back and forth between CSV and JSON
  • Convert addresses or descriptions that contain quotes and line breaks without breaking them

Frequently Asked Questions

Is my data sent to a server?
No. All conversion happens entirely in your browser. The data you paste is never transmitted to or stored on any external server, so CSVs with internal or personal data are safe to use here.
Can it handle values that contain commas or line breaks?
Yes. The parser follows RFC 4180, so a value wrapped in double quotes may contain commas, line breaks, and escaped double quotes (written as "") and is still treated as a single field. When converting JSON back to CSV, any value containing those characters is wrapped in double quotes automatically.
Does it support tab-separated values (TSV)?
Yes. Choose Tab as the delimiter to read and write TSV. Tables copied from Excel or a spreadsheet are usually tab-separated, so you can paste them straight in and convert.