JSON验证器
免费在线JSON验证器。在浏览器中即时处理数据。无上传,无注册,完全私密。
Local processingWhat is JSON验证器?
A JSON validator checks whether a string is well-formed JSON according to RFC 8259. Valid JSON uses double-quoted strings, supports objects, arrays, numbers, booleans, and null, and disallows trailing commas and comments. The validator parses the input and reports either success or a precise error — including the line, column, and a human-readable reason — so the user can fix the problem at its source.
How It Works
The tool attempts JSON.parse on the input string. If parsing succeeds, the input is valid and the tool reports the parsed structure's type and size. If parsing throws a SyntaxError, the error message is parsed to extract the character offset, which is converted to a line and column number for display. A lenient mode may optionally accept JSON5 (single quotes, trailing commas, comments) but strict mode follows the RFC.
Common Use Cases
- Checking API request bodies — confirm a payload is valid before sending it to a server
- Validating config files — catch syntax errors in JSON configuration before deployment
- Debugging parse failures — locate the exact position of a missing comma or unquoted key
- Linting data exports — verify that a generated JSON file is structurally correct
Technical Details
Standard: RFC 8259 (strict JSON). Disallowed: trailing commas, single-quoted strings, comments, unquoted keys, NaN/Infinity. Error reporting: character offset converted to 1-based line and column. The validator does not check schema conformance (use JSON Schema for that). Maximum input size is bounded by browser string/memory limits.
How to Use
Enter your input above. The result updates automatically. Use the copy button to copy the result.
Privacy
All processing happens in your browser. Your data is never uploaded to any server.
FAQ
这个JSON验证器免费吗?
是的,完全免费。无需注册。
这个工具会上传我的数据吗?
不会。所有处理都在浏览器中本地完成。您的数据永远不会离开您的设备。
What JSON standards are supported?
The validator follows RFC 8259 (the official JSON specification). It rejects trailing commas, single-quoted strings, comments, unquoted keys, and NaN/Infinity values. For lenient parsing (JSON5 features), use the JSON Formatter tool which may accept extended syntax.