JSON 校验
校验 JSON,提供详细错误与行号
Catch syntax issues before they reach production
A validator tells you exactly where a payload stops being valid JSON. That matters when an AI model emits malformed output, an API returns broken data, a config file breaks a deploy, or a fixture fails in CI and the error message is too vague to trust at a glance.
Use the validator when you need to
Confirm a payload is valid JSON
Run a fast syntax check before you feed the data into an API client, parser, or schema validator.
Pinpoint line and column errors
Find the exact location of missing commas, bad quotes, truncated objects, or other parse failures.
Triage malformed fixtures, config files, and model output
Validate copied request bodies, seed files, local config, and structured AI output before they break a deploy or test run.
How to validate JSON quickly
- 1
Paste the JSON payload into the editor.
- 2
Click Validate to run the syntax check and inspect any reported line and column errors.
- 3
If it fails, repair the payload or apply a suggested fix, then validate again.
Keep going
Repair invalid JSON
Fix common syntax mistakes automatically before validating again.
Understand parser errors
See what common error messages mean and how to resolve them faster.
Learn how to fix invalid JSON
Work through the most common mistakes developers hit in real payloads.
Validate against a schema
Move from syntax validation to contract validation when shape matters too.
Common validator workflows
Paste the response to isolate whether the issue is syntax, truncation, or an unexpected literal.
Validate it first so you know whether the bug is in the JSON or in the request itself.
Use the exact error position to repair the file without diffing every line manually.
相关工具
常见问题
把 JSON 粘贴到编辑器里,点击 Validate。工具会按官方规范 RFC 8259 校验,并给出错误的具体行号和原因说明。
开发者最常遇到的 5 类错误是:最后一项后面多了逗号(trailing comma)、用单引号代替双引号、属性名没加引号、项之间漏逗号、写了注释(JSON 不支持注释)。
不允许。标准 JSON(RFC 8259)不支持任何注释:不支持 //、不支持 /* */、也不支持 #。如果确实需要注释,可以考虑 JSONC 或 JSON5,或者用我们的 JSON Repair 工具自动移除注释。
很多时候是“不可见字符”导致的,比如不换行空格(non-breaking space)、零宽字符、BOM 标记等。另外也要注意一些编辑器会自动插入的智能引号(弯引号/curly quotes)。