JSON Formatter & Validator
Beautify raw JSON, minify payloads, or validate syntax. When parsing fails, the validator points out the exact line and character position.
Processed locally in your browser
JSON Syntax Rules
Standard JSON (JavaScript Object Notation) requires strict adherence to grammar rules:
- Double quotes: Property keys and string values must use double quotes (
"key"), not single quotes ('key'). - No trailing commas: Commas after the final element in an object or array (e.g.
{"a": 1,}) violate the specification and cause parse failures. - No comments: The standard JSON specification does not support
//or/* */comment syntax. - Numbers: Leading zeros before whole integers (e.g.
05) are invalid.
Locating Errors
When you click Validate Syntax or Format JSON, the browser parser evaluates the document. If an error is present, ToolNest computes the exact line number, column offset, and a snippet of the surrounding characters so you can find the misplaced comma or bracket immediately.
Related Utilities
-
URL Encoder / Decoder →
Escape characters for web requests.
-
Word Counter →
Count characters and lines.