代码、数据与二维码工具

JSON转CSV

将单个JSON对象或最多10,000个对象的数组转换为CSV;按首次出现顺序合并列,嵌套值使用紧凑JSON,支持RFC 4180式转义、公式保护、复制和UTF-8 BOM下载。

优先本地处理无需注册隐私说明 ↗

Enter one object or a non-empty array of up to 10,000 objects. Maximum 100,000 characters.

Prefixes an apostrophe to string cells and headers whose first non-whitespace character is =, +, -, or @.

使用步骤

如何使用

  1. Paste one JSON object or an array containing up to 10,000 objects.
  2. Choose whether to protect text that spreadsheet apps could interpret as formulas.
  3. Convert, review the CSV, then copy it or download a UTF-8 CSV file.

Defined row and column rules

The top level must be one object or a non-empty array of objects. Columns are the union of own keys in first-seen JavaScript enumeration order. Nested arrays and objects become compact JSON; missing values and null become empty CSV fields.

CSV and spreadsheet boundaries

Rows use CRLF and fields containing commas, quotes, or line breaks use doubled-quote CSV escaping. Formula protection is enabled by default and prefixes an apostrophe to risky string cells and headers. Copied CSV has no byte-order mark; the download adds a UTF-8 BOM for spreadsheet compatibility. Large JSON integers may lose precision in the browser, so keep exact identifiers as strings.

常见问题

你可能还想知道

Can I convert a single object?

Yes. It becomes one data row. An array converts each object to a row.

How are nested values handled?

Arrays and objects are stored as compact JSON inside one escaped CSV field; they are not flattened into extra columns.

Why is formula protection enabled?

Spreadsheet applications can execute text beginning with characters such as =, +, -, or @ as a formula. The option prefixes risky text with an apostrophe; turn it off only when exact string preservation matters more.