JSON Validator
This validator checks your document against the JSON standard while you type and pinpoints the first error with its line, column and a caret under the offending character. It also detects duplicate keys, which most parsers silently overwrite, and summarises the structure with counts of keys, objects, arrays and nesting depth.
How to use the JSON Validator
- Paste the JSON you want to check.
- Read the green "Valid JSON" message or the red error with its position.
- Fix the highlighted character and the result updates immediately.
- Review any duplicate-key warnings and the structure statistics.
Features
- Strict RFC 8259 syntax validation
- Line and column reporting with a caret under the error
- Duplicate key detection with JSON paths such as $.user.id
- Statistics: keys, depth, objects, arrays, strings, numbers
- Clear messages for common mistakes like single quotes and trailing commas
Benefits
- Catch broken config or API payloads before they reach production
- Spot silent data loss caused by duplicate keys
- Works offline in your browser with no upload
Frequently asked questions
Are duplicate keys invalid JSON?
The JSON standard says keys should be unique but parsers are not required to reject duplicates. Most keep only the last value, so the validator warns you instead of failing.
Does it validate against a JSON Schema?
No. It checks syntax and structure only. Schema validation (required fields, types) needs a separate schema validator.
Why is the column number different from my editor?
Columns count characters from 1 on each line, and a tab counts as one character. Editors that expand tabs to several columns may show a larger number.
Related tools
- JSON Formatter — Beautify or minify JSON with 2-space, 4-space or tab indents, sort keys and browse it as a collapsible tree.
- XML Formatter — Pretty-print or minify XML with comments, CDATA and DOCTYPE support, plus a well-formedness check with error positions.
- HTML Formatter — Beautify HTML with your choice of indentation and line wrapping, including inline <script> and <style> blocks.
- CSS Formatter — Beautify minified CSS into readable rules with custom indentation, brace style and one selector per line.
- JavaScript Formatter — Beautify JavaScript with configurable indentation, brace style and line wrapping to make minified code readable.
- Code Minifier — Minify JavaScript with Terser, plus CSS and HTML, and see the original size, minified size and percentage saved.