跳到正文Skip to content

JSON 格式化与校验JSON Formatter & Validator

格式化、压缩并校验 JSON,精确定位语法错误。Pretty-print, minify and validate JSON with precise error locations.

理念:Idea: 数据理清楚,错误藏不住。Tidy data, nowhere for errors to hide.

解决:Solves: 格式化 JSON 并指出语法错在哪Formats JSON and points to syntax errors

适合:For: 开发、测试、对接接口的人Developers and testers

可用Available在浏览器中运行Runs in your browser
Loading tool…

在你的设备上本地处理。这里输入的内容不会上传。Processed locally on your device. Nothing you enter here is uploaded.

使用方法How to use

  1. 1把 JSON 粘贴到输入框。Paste JSON into the input.
  2. 2选择格式化或压缩。无效的 JSON 会标出行和列。Choose Format or Minify. Invalid JSON is reported with line and column.
  3. 3复制或下载结果。Copy or download the result.

说明Good to know

  • 输入用标准 JSON 解析,不会当成代码执行。Input is parsed with the standard JSON parser and is never executed as code.
  • 大于 2^53 的数字会丢失精度,和任何 JavaScript JSON 解析器一样。Numbers larger than 2^53 lose precision, as in any JavaScript JSON parser.
  • Base64 编解码Base64 Encoder / Decoder

    文本与 Base64 互转,完整支持 UTF-8 与中文。Encode text to Base64 and decode it back, with full UTF-8 support.

    可用Available开发者工具Developer
  • URL 编解码URL Encoder / Decoder

    对 URL 参数或完整链接进行百分号编码与解码。Percent-encode URL components or full URLs and decode them back.

    可用Available开发者工具Developer
  • Hash 计算Hash Generator

    计算文本的 SHA-1、SHA-256、SHA-384、SHA-512 值。Compute SHA-1, SHA-256, SHA-384 and SHA-512 of any text.

    可用Available开发者工具Developer
  • HTML 转义HTML Escape / Unescape

    转义或还原 HTML 里的特殊字符(< > & 引号等)。Escape or unescape special characters in HTML text and attributes.

    可用Available开发者工具Developer