Converter

CSV ↔ JSON Converter

Convert between CSV and JSON formats. Convert from CSV to JSON or JSON to CSV.

Result (JSON)

Output Character Count: 0

CSV ↔ JSON Converter

Convert a CSV file into a JSON array, or a JSON array into CSV. In CSV → JSON mode, you open a .csv file and the first row becomes the keys of each object. In JSON → CSV mode, you paste an array of objects and get comma-separated rows with a header line. The result can be copied or downloaded as converted.json or converted.csv.

How to use

  1. Choose the direction at the top: CSV → JSON (the default) or JSON → CSV.
  2. For CSV → JSON, press Upload CSV File and choose a UTF-8 encoded .csv file. The file is read in your browser.
  3. For JSON → CSV, paste a JSON array of objects into the JSON Input box. If the JSON is invalid or is not an array, an error is shown.
  4. Check the result and its output character count.
  5. Copy the result, or press Download to save it as converted.json or converted.csv.

Frequently asked questions

What CSV format is supported?
Comma-separated values with a header row. Fields can be wrapped in double quotes, so commas inside quotes are kept, and a doubled quote ("") stands for one quote. Blank lines are skipped, spaces around values are trimmed, and CRLF, LF and CR line endings all work. Semicolon- or tab-separated files are not split into columns, and line breaks inside a quoted field are not supported.
What does the JSON look like?
An array with one object per data row, indented with 2 spaces. Every value is a string: a column containing 30 becomes "30", not the number 30. A row with fewer columns than the header gets empty strings for the missing ones.
My CSV from Excel shows garbled characters. Why?
The file is read as UTF-8. CSV files saved by older versions of Excel in Japanese and some other languages use a legacy encoding such as Shift_JIS. Save the file as “CSV UTF-8” and open it again.
Can I paste CSV text instead of uploading a file?
Not at the moment: CSV → JSON reads from a file. Save the text as a .csv file first. JSON → CSV works with pasted text.
What JSON can be turned into CSV?
An array of objects, such as [{"name":"Ann","age":30}]. The columns come from the keys of the first object; keys that only appear in later objects are not included, and missing values become empty cells.
Does it handle nested JSON?
Nested values are not expanded into columns. An object inside a row becomes the text [object Object], and an array is written as its items joined by commas, so flatten nested data first.
How are commas and quotes handled in JSON → CSV?
Values that contain a comma, a double quote, a line break, or leading or trailing spaces are wrapped in double quotes, and quotes inside them are doubled, so spreadsheets read them correctly.
Is my file uploaded to a server?
No. “Upload” here means opening the file in the page: it is read and converted in your browser and nothing is sent anywhere.