CSV 转 JSON
在浏览器中将逗号、分号、制表符或竖线分隔的数据转换为JSON;支持严格引号、多行字段、表头或自动列名、保守类型识别、复制和JSON下载。
使用步骤
如何使用
- Paste delimited data up to 100,000 characters and choose its separator.
- Choose whether the first row contains column names and whether safe values should be detected as booleans, null, or numbers.
- Convert, review the JSON, then copy it or download a JSON file.
Strict and predictable CSV parsing
Quoted fields can contain separators, doubled quotes, and line breaks. An optional UTF-8 byte-order mark is removed from the start. Empty rows are ignored, while every remaining data row must have exactly the same number of fields as the header or first row.
Conservative type detection
Values stay as strings by default. Optional detection converts exact true, false, and null values plus finite numbers that can be represented safely. Integers with leading zeros and integers outside JavaScript’s safe range remain strings. The tool supports up to 10,000 data rows and 500 columns and processes everything in your browser.
常见问题
你可能还想知道
What happens when my file has no header row?
Turn off the header option. Columns are named column_1, column_2, and so on from the first data row.
Can fields contain commas or line breaks?
Yes. Wrap the field in double quotes and double any quote inside it. The parser preserves line breaks inside quoted fields.
Why did a number stay as text?
Type detection deliberately preserves values with leading zeros and unsafe integers so IDs and exact digits are not silently changed.