⚡ Curated dev resources & dealsSponsored
DevToolBayFree Developer Tools

CSV 转 JSON

CSV 转 JSON:首行为键、数字布尔自动类型化、引号内逗号换行转义正确解析、列数不齐实时警告。

Delimiter
Auto-convert numbers & booleans

Parser details

A full RFC 4180 state machine is used: fields may be quoted, quotes escape as "", and delimiters or line breaks inside quotes are preserved. Rows with more cells than the header are kept (extra values dropped is not what happens — extra columns are reported in the meta line), rows with fewer cells get null for the missing values. “Auto-convert” turns 42, 3.14, true, false and null into native JSON values; keep it off to force strings everywhere.

如何使用CSV 转 JSON

粘贴来自 Excel、数据库或任意导出的 CSV,右侧实时出现 JSON 数组:首行变键,数值自动类型化(数字保持数字),分号或 tab 分隔也能自动识别——包括欧式区域设置的导出怪癖。

带引号内逗号、引号、换行的字段按 RFC 4180 状态机解析,杂乱的真实导出不再坍缩成一行残骸。结果可以直接进脚本、API 载荷或数据库导入,以带类型的 JSON 形式落地。

相关工具