JSON 格式化与校验:别再用肉眼找括号

无论是调接口、写配置还是看日志,JSON 都是逃不开的格式,而未格式化的 JSON 一长串挤在一起,肉眼根本没法读。这个工具做三件事:格式化(美化缩进)、压缩(去空白省体积)、校验(语法检查)。

特点

  • 自动修复尾随逗号:很多场景手写会多打个逗号,这里直接帮你修掉。
  • 错误定位:JSON 非法时指出大概位置,不用自己从报错里猜。
  • 本地运行:数据不出浏览器,接口返回的敏感内容也能放心贴进来。

典型用法

从接口响应、日志文件或 AI 输出里复制一段 JSON 粘贴进来,点格式化即可。想省流量或存库时,点压缩得到单行紧凑版本。

JSON Formatter: stop hunting brackets by eye

From API calls to configs to logs, JSON is everywhere — and unformatted JSON is a wall of text you can't read by eye. This tool does three jobs: format (pretty-print), minify (strip whitespace) and validate (syntax check).

Highlights

  • Fixes trailing commas: hand-written JSON often has one extra comma — auto-fixed here.
  • Error location: when JSON is invalid, points at roughly where, no guessing from error dumps.
  • Runs locally: nothing leaves your browser, so sensitive API payloads are safe to paste.

Typical use

Copy JSON from an API response, log or AI output, paste, hit format. To shrink payloads for storage or transport, hit minify.