将 CSV 文件转换为 JSON 格式,并可自定义分隔符、引号和输出格式。支持标题、注释和动态类型转换。
此工具可将逗号分隔值 (CSV) 文件转换为 JavaScript 对象表示法 (JSON) 数据结构。它支持各种 CSV 格式,并带有可自定义的分隔符、引号和注释符号。转换器可以将第一行视为标题,跳过空行,并自动检测数字和布尔值等数据类型。生成的 JSON 可用于数据迁移、备份或作为其他应用程序的输入。
Convert a simple CSV file into a JSON array structure.
name,age,city John,30,New York Alice,25,London
[
{
"name": "John",
"age": 30,
"city": "New York"
},
{
"name": "Alice",
"age": 25,
"city": "London"
}
]Convert a CSV file that uses semicolons as separators.
product;price;quantity Apple;1.99;50 Banana;0.99;100
[
{
"product": "Apple",
"price": 1.99,
"quantity": 50
},
{
"product": "Banana",
"price": 0.99,
"quantity": 100
}
]Process CSV data while handling comments and empty lines.
# Comment id,name,active 1,John,true 2,Jane,false 3,Bob,true
[
{
"id": 1,
"name": "John",
"active": true
},
{
"id": 2,
"name": "Jane",
"active": false
},
{
"id": 3,
"name": "Bob",
"active": true
}
]