MDevTools

JSON FormatterJSON 在线格式化

Format, validate and minify JSON — Chinese-safe, runs in your browser.

格式化、校验并压缩 JSON,支持中文与错误定位。全程在浏览器本地完成。

What is JSON Formatter?JSON 在线格式化 是什么?

A JSON formatter takes raw, minified or badly indented JSON and turns it into a readable, properly indented tree. It also validates the syntax and flags the exact line and column where an error occurs, and it can minify JSON back down for production use. Everything happens inside your browser, so payloads containing tokens, credentials or customer data are never transmitted anywhere.

JSON 格式化工具把压缩的、未缩进的或格式混乱的 JSON 变成结构清晰、缩进正确的可读文本,同时校验语法并精确定位出错的行与列,也可以把 JSON 重新压缩用于生产环境。所有处理都在你的浏览器内完成,包含令牌、密钥或用户数据的 JSON 不会被传输到任何地方。

How to use json formatter如何使用 JSON 在线格式化

  1. Paste your JSON into the input box, or drop a .json file onto it.
  2. Choose an action: Format for readable indentation, Minify to strip whitespace, or Validate to check syntax only.
  3. If validation fails, read the error message — it points to the line and column of the problem.
  4. Copy the result with one click. Chinese and other non-ASCII characters are kept readable instead of being escaped.
  1. 把 JSON 粘贴进输入框,或直接把 .json 文件拖到框内。
  2. 选择操作:格式化(可读缩进)、压缩(去除空白)、仅校验语法。
  3. 如果校验失败,按错误提示的行号列号定位问题。
  4. 一键复制结果。中文等非 ASCII 字符保持可读,不会被转义成 \uXXXX。

Common uses常见用途

FAQ常见问题

Is my JSON sent to a server?我的 JSON 会被上传到服务器吗?

No. Parsing, formatting and validating all run in your browser using the built-in JSON engine. Nothing is uploaded, logged or stored.

不会。解析、格式化、校验全部使用浏览器内置的 JSON 引擎在本地完成,不上传、不记录、不存储。

Why does my JSON look correct but still fail validation?为什么我的 JSON 看着对却校验失败?

The usual causes are trailing commas, single quotes instead of double quotes, unquoted keys, or comments. JSON is strict: no trailing commas, no comments, and all keys must be double-quoted strings.

常见原因是结尾多余逗号、用了单引号、键没有加引号、或夹带了注释。JSON 语法严格:不允许结尾逗号和注释,键必须用双引号。

Does it handle Chinese and emoji correctly?中文和 emoji 会出错吗?

Yes. The formatter keeps Unicode characters readable instead of converting them to \uXXXX escapes, so Chinese, Japanese and emoji stay legible.

不会。格式化后中文、日文、emoji 保持可读,不会被转义成 \uXXXX 编码。

Is there a size limit?有文件大小限制吗?

Only your device memory. Because everything is local, files that would be rejected by an upload limit on other sites work fine here.

只受你设备内存限制。因为完全本地处理,别的网站会因上传上限拒绝的大文件在这里也能用。

Other tools其他工具

🔤

Base64 Encode / DecodeBase64 编解码

Encode or decode Base64 text with UTF-8 and URL-safe support.…

对文本进行 Base64 编码或解码,支持 UTF-8 中文与 URL 安全字符…

🔗

URL Encode / DecodeURL 编解码

Percent-encode or decode URLs, params and text.…

对网址、参数或文本进行 URL 百分号编码与解码,方便调试接口与链接。…

#️⃣

Hash Generator哈希生成

Generate MD5, SHA-1, SHA-256 or SHA-512 hashes.…

用 MD5、SHA-1、SHA-256 或 SHA-512 为文本生成哈希值,常…

🆔

UUID GeneratorUUID 生成

Generate random UUID v4 identifiers.…

一键生成多个随机 UUID v4,用于主键、追踪 ID 与测试数据。…

🎫

JWT DecoderJWT 解码

Decode a JSON Web Token locally, no upload.…

在浏览器本地解码 JSON Web Token 的 Header 与 Paylo…

🔎

Regex Tester正则测试

Test regular expressions and see matches live.…

实时测试正则表达式,查看匹配数量与命中内容,方便调试抓取与替换规则。…

Sister sites友情链接 MonkeyDev dev tools hub工具总站 FreePDFKit PDF toolsPDF 工具集 ImageToolKit image tools图片工具集 AI 咒语库 AI prompt libraryAI 提示词库 CalcKit finance calculators财务计算器 OfficeKit office utilities办公工具箱 AIkit AI & machine learningAI 与机器学习 DataKit data & spreadsheet tools数据与表格工具 ChartKit diagrams & charts图表与可视化 DocKit markdown & document toolsMarkdown 与文档工具