JSON → CSV

JSON 转 CSV 转换器

粘贴 JSON 数组,将其转换为干净的 CSV。转换器读取对象数组,从键中构建列,展平嵌套值,并导出可在任何地方打开的 CSV(或 TSV、竖线分隔等)。

免费无需注册在浏览器中运行兼容 Excel
开始转换
JSON Text to CSV Converter
粘贴或上传文本以进行转换。
输入 — 粘贴或上传
Drag a file here, or browse (.txt, .csv, .tsv, .json)
输出
输入类型
输入分隔符
列宽
输出为
自定义分隔符
纯文本样式
引号处理
换行符

此处将实时预览数据表格。

Paste a JSON array of objects above — the keys become your CSV header row.

广告
功能一览

Convert JSON text to CSV

APIs and config files speak JSON, but spreadsheets and many tools want CSV. This tool handles the common json to csv job: paste a JSON array of objects and it produces a table where each object is a row and each key is a column.

It collects the union of keys across all objects, so even if some records are missing a field, every column still lines up — missing values become empty cells. Nested objects and arrays are written as compact JSON inside their cell, so no data is silently dropped.

Going the other way? Use text to CSV for delimited input, or export your CSV as an HTML table. For a quick reverse, the converter can output JSON from CSV too.

分步指南

How to use it

粘贴或上传

Add your text or drop a file — it is read locally in your browser, never uploaded.

Preview & adjust

Check the live table and the row / column counts, then tweak the delimiter or options if a column looks off.

Copy or download

Grab the result with Copy or Download. You can reopen recent conversions from this device too.

示例

Input and output example

A JSON array of objects becomes a CSV with the keys as the header row.

Input
[{"name":"Ada","age":31},
 {"name":"Lin","age":27}]
输出
name,age
Ada,31
Lin,27
Details

How JSON maps to CSV columns

了解映射关系有助于获得预期的表格。

Array of objects

The standard input is a JSON array like [{"name":"Ada","age":31}, ...]. Each object becomes a row; the keys (name, age) become the header. Tick 首行为表头 to keep those names visible in the preview.

Uneven or missing keys

Real data is rarely uniform. If one object has a key another lacks, the converter still includes that column for every row and leaves the cell empty where the value is absent, so the CSV stays rectangular and imports cleanly.

Nested objects and arrays

When a value is itself an object or array, it is serialized as compact JSON within the cell rather than being dropped. If you need those broken into separate columns, flatten the JSON first, then convert.

Choosing the output

CSV is the default, but you can export TSV, pipe, semicolon or a custom delimiter from the same parsed data — handy when the destination is a database load rather than a spreadsheet.

Good to know

Tips and edge cases

  • Wrap multiple records in an array: [ {...}, {...} ].
  • Need nested fields as columns? Flatten the JSON before converting.
  • Use 示例 to load an example JSON array and see the mapping.
常见问题

JSON Text to CSV Converter — FAQ

What JSON shape does it expect?

An array of objects works best. A single object or an array of arrays is also supported.

How are nested objects handled?

They are written as compact JSON inside the cell. Flatten beforehand if you want them split into columns.

What if records have different keys?

The converter uses the union of all keys and leaves missing values empty, keeping the CSV rectangular.

Is anything uploaded?

No. The JSON is parsed and converted in your browser.