首页
Tom Utilities

CSV 转 JSON

XML 与 YAML 工具

将 CSV 或 TSV 行转换为 JSON 数组,首行作为键名。

输入

结果

使用方法

Converting CSV to JSON

Paste CSV with a header row, press Convert and the JSON array is generated.

  1. Paste CSV with headers.
  2. Press Convert.
  3. Copy or download the JSON.

常见问题

How are headers handled?

The first row defines the JSON keys; empty headers become column_1, column_2 and so on.

Are numbers converted?

No, values are kept as strings so that leading zeros are preserved.