JSON转CSV

对象数组转为 CSV 表格并下载。

csv表格导出
关于「JSON转CSV」

它属于「JSON 工具」分类:JSON 的格式化、结构变换与各种数据格式互转。

  • 输入需要是<b>对象数组</b>,表头由所有对象键名的并集自动生成。
  • 勾选<b>展开嵌套字段</b>后,<code>{"a":{"b":1}}</code> 会变成列 <code>a.b</code>,避免整段 JSON 挤在一个单元格里。
  • 含逗号、引号或换行的内容会自动加引号转义,符合 RFC 4180 规范。
  • <b>BOM</b> 是给 Excel 认中文用的:不加的话用 Excel 直接打开可能出现乱码。
  • 某些对象缺少的字段会在对应单元格留空,不会导致列错位。

完全免费、无需注册;所有处理都在浏览器本地完成,文件不会上传到任何服务器。

相关关键词:JSON转CSV、JSON 工具、csv、表格、导出、在线工具、免费

如何使用「JSON转CSV」
  1. 打开工具:打开「JSON转CSV」页面,无需注册、无需安装任何软件。
  2. 准备输入:准备好要处理的内容或文件:文本可直接粘贴,文件可拖入页面(本工具属于「JSON 工具」)。
  3. 填入内容:把内容粘贴进输入框,或把文件拖入页面;也可以点击「示例」先填入样例数据试一下。
  4. 设置选项并处理:按需调整页面上的选项,然后点击处理 / 转换 / 生成按钮。
  5. 获取结果:处理完全在浏览器本地完成,结果可直接复制或下载,文件不会上传到任何服务器。
常见问题
为什么要加 BOM?
Excel 打开 CSV 时不会自动识别 UTF-8,默认按系统本地编码解析,中文就会变成乱码。文件开头加上 BOM 标记后,Excel 就能正确识别为 UTF-8。用其它工具处理时可以不加。
嵌套对象怎么处理?
勾选“展开嵌套字段”会把层级摊平成 <code>a.b.c</code> 形式的独立列;不勾选则把整个子对象序列化成 JSON 字符串塞进一个单元格。
各行字段不一样会怎样?
表头取所有对象键名的并集,某行没有的字段会留空,因此不会出现列数不齐的问题。
分隔符该选哪个?
中文 Windows 的 Excel 有时默认按分号分列,如果打开后所有内容挤在一列,可以改用分号或制表符再试。
JSON to CSV (English)

Convert an array of objects into a downloadable CSV.

Belongs to “JSON Tools”: Format, transform and convert JSON to and from various data formats.

  • Input must be an <b>array of objects</b>; the header is auto-built from the union of all keys.
  • With <b>flatten nested</b>, <code>{"a":{"b":1}}</code> becomes column <code>a.b</code>, avoiding a whole JSON blob in one cell.
  • Content with commas, quotes or newlines is auto-quoted per RFC 4180.
  • <b>BOM</b> lets Excel read Chinese correctly; without it, opening in Excel may show mojibake.
  • Fields missing from some objects leave blank cells, never shifting columns.

Free, no sign-up; everything runs locally in your browser and files are never uploaded.

Keywords: JSON to CSV, JSON Tools, csv, export, online tool, free

How to use it

  1. Open the tool:Open the “JSON to CSV” page — no sign-up and nothing to install.
  2. Prepare the input:Prepare the content or file to process: paste text or drop a file onto the page (this tool belongs to “JSON Tools”).
  3. Provide the input:Paste your content into the input box or drop a file onto the page; you can also click “Sample” to try example data first.
  4. Adjust options and run:Adjust the options if needed, then click the process / convert / generate button.
  5. Get the result:Everything runs locally in your browser; copy or download the result — your files are never uploaded.

FAQ

Why add a BOM?
Excel does not auto-detect UTF-8 when opening CSV, defaulting to the system locale, which garbles Chinese. A leading BOM makes Excel recognize UTF-8. Other tools don't need it.
How are nested objects handled?
Flatten nests into columns like <code>a.b.c</code>; otherwise the whole sub-object is serialized as a JSON string in one cell.
What if rows have different fields?
The header is the union of all keys; missing fields become blanks, so column counts stay consistent.
Which delimiter should I pick?
Chinese Windows Excel sometimes splits on semicolons by default; if everything lands in one column, try semicolon or tab.

More tools in JSON Tools

  • JSON Formatter/Minifier — Beautify, minify, validate and highlight JSON.
  • Sort JSON Keys — Recursively sort object keys alphabetically to ease diffing.
  • Flatten JSON — Flatten nested structures into a.b.c single-level keys.
  • Unflatten JSON — Restore dotted-path objects into nested structures.
  • CSV to JSON — Parse CSV text or files into a JSON array.
  • JSON to Excel — Export an array of objects as an .xlsx workbook.
  • Excel to JSON — Upload an Excel file and convert sheets to JSON.
  • JSON to XML — Convert JSON structures into well-indented XML.
  • XML to JSON — Parse an XML document into an equivalent JSON object.
  • JSON to YAML — Convert JSON into more readable YAML.
  • YAML to JSON — Parse YAML config into standard JSON.
  • JSON to SQL — Generate INSERT statements and CREATE TABLE DDL from arrays.
  • SQL to JSON — Reverse-engineer JSON data from INSERT statements.
  • JSON to Base64 — Convert JSON to and from Base64 with UTF-8 support.
  • JSON ⇄ Cookie — Convert between Cookie strings and JSON key-values.
  • JSON Diff — Recursively compare two JSON documents, marking add/delete/change.

返回崽崽工具箱首页