Convert CSV to JSON object array
- Select CSV → JSON and choose the actual delimiter between comma, semicolon, and tab.
- Paste data with column names in the first row or load a UTF-8 file.
- and check the resulting key and value.
- Copy the JSON or download it as a file.
Column names in the first row cannot be empty or duplicate. All rows must have the same number of columns as the first row. This tool does not automatically guess numbers, dates, or booleans; it preserves CSV values as strings. Leading and trailing spaces are also part of the value.
id,name
001,Alice
002,BobThe result for the first row of data is:
{"id":"001","name":"Alice"}Empty cells result in an empty string. If you change a code like 001 to a number, the leading 0 disappears, so it is better to keep the identifier as a string. Other programs can also convert string values within a JSON file, so check the final processing rules.
Processing commas, double quotes, and line breaks within cells
In CSV, if the value itself contains a comma or line break, it is widely used to enclose it in double quotation marks, and to write double quotation marks within the value twice. For example, the data below has two columns and the name values are Alice, Kim.
id,name
001,"Alice, Kim""He said ""Hello""" represents one cell with He said "Hello". Line breaks within quotes remain in the same cell, and line breaks outside quotes are processed to the next line. Therefore, it is difficult to read such data accurately by simply cutting it line by line first and dividing it with commas.
This tool reads CRLF·LF·CR line breaks and does not create an extra blank line with a single line break at the end of the last line. Blank lines in the middle are treated as records, so an error occurs if the number of columns is different. Characters that do not meet strict input rules, such as spaces after closing quotes, are rejected. TSV and semicolon delimitation are also supported by this tool, which enforces the same quoting rules, and does not mean that it is the same as the TSV dialect in all programs.
Note: CSV format description in RFC 4180. This document is an informational document that summarizes commonly used CSV practices.
What happens to columns and empty values when saving JSON as CSV?
Input must be an array of objects. For example, [{"id":"001","active":true},{"id":"002","note":"memo"}]. It collects the keys of all objects to create a column, using the order of the first key encountered, based on the order in which keys are enumerated in JavaScript. Integer-shaped keys may be enumerated in a different order than regular string keys.
All missing keys and null are output as empty cells. Since empty strings are also expressed as empty cells, these three cannot be distinguished and restored using CSV alone. Booleans are exported as true·false text, and numbers are exported as a string representation of the number. Converting CSV back to JSON does not automatically recover the original data type because all values are strings.
Reject nested objects and arrays. The rules for expanding address objects into columns such as address.city depend on the data and are not determined automatically. Because JSON is read as JavaScript numbers, the precision of large or decimal numbers may change. Reject integer values outside the safe integer range, and pass identifiers such as long order numbers as strings enclosed in double quotes from the beginning. Duplicate keys in JSON may leave the parser with the last value, so keep the original.
Excel Hangul/UTF-8 BOM and formula interpretation options
File input only supports UTF-8. For other encoding files such as CP949·EUC-KR, prepare them as UTF-8 first. The BOM option in CSV downloads prepends UTF-8 marking bytes to the file. Depending on the program, this may help determine character encoding, but it does not resolve all import settings. The BOM is not included in the results screen and copy, nor is it included in the JSON download.
CSV is not an XLSX file, which preserves cell data types, colors, fonts, or multiple sheets. When opened in a spreadsheet, 001 may be replaced with the number 1 or interpreted like a date. Specify the identifier column as text in the program's import screen and see the actual result.
The single quote option, which is turned on by default, places a single quote before strings and column names that start like formulas. This is a process to reduce the risk of interpreting formulas for strings that start with equal signs, addition, subtraction, etc., and changes the actual data. Negative numeric numbers are handled differently than strings. We do not guarantee the safety of all spreadsheets and their resaving process, so please check the import settings and content for data from unknown sources. If you need to export the original text, understand the impact of the option before turning it off.
Security Note: OWASP CSV Injection.
Order to check when capacity limitations and errors occur
Input is 2MiB based on UTF-8, data is 10,000 rows and 100 columns, and output is 8MiB or less. JSON repeats key names in each row, so it can be larger than CSV. If you are limited by output, split the input. The data is currently processed by the browser, and when you refresh, your input and results disappear.
For column count errors, check whether the delimiter is correct, whether values containing commas are enclosed in quotation marks, or whether there are empty lines. JSON syntax errors can be checked with the JSON Cleanser. Successful conversion does not mean that the required fields or business rules of the API have been verified. Keep the original separately and review the results by number of rows, number of columns, and representative values.
Frequently Asked Questions
Automatically convert numbers in CSV to JSON numbers?
No. Keep all cells as strings. This is a method to avoid random changes to identifiers such as 001 or long numeric strings.
Can I also upload Excel XLSX files?
Not supported. Export the required sheets from the spreadsheet as UTF-8 CSV and use them.
Is the data exactly the same when I round-trip between CSV and JSON?
This is not always the case. The distinction between null, missing key, and empty string and the JSON data type cannot be restored with a CSV round trip. Turning on the single quote option will also change that string.