Waiting for JSON content
Start typing on the left or load one of the sample payloads to inspect it instantly.
Instantly clean, validate, and inspect web payloads
Start typing on the left or load one of the sample payloads to inspect it instantly.
Validate JSON syntax in real-time. Detect exact line numbers, column markers, missing quotes, and invalid syntax according to RFC 8259 specifications.
Every tool runs in your browser, so the JSON you paste never leaves your device.
Formatting, minifying, repairing, and the tree view all run on your device, so there are no uploads to wait on.
Syntax errors like unescaped quotes and trailing commas are flagged with their exact line and column.
What makes JSON valid, how errors are pinpointed by line and column, and the mistakes that break it most often.
Validating JSON means trying to parse it against the rules of the JSON grammar. The parser reads the text left to right, turning it into tokens — braces, brackets, colons, commas, strings, numbers, and the keywords true, false, and null — and checks that they appear in a valid order. If something is out of place, such as a comma right before a closing bracket, parsing stops at that point and reports an error. PrettyJSON validates as you type, so you see problems immediately instead of after a failed request.
A message like "Unexpected token" is not much help in a file with thousands of lines. PrettyJSON tracks the line and column as it parses, so when it hits a problem it points to the exact spot and shows the surrounding text. That turns "somewhere this JSON is broken" into "line 14, column 28: trailing comma before the closing bracket," which is usually enough to fix it in seconds.
Line 14, Column 28:
"permissions": ["read", "write",]
^
Error: trailing comma before ']'. JSON does not allow a comma after the last item in an array.Most invalid JSON fails for a small set of reasons: single quotes instead of double quotes, a trailing comma after the last item, keys that are not quoted, JavaScript-style comments, and Python values like True, False, or None pasted from a log. These are easy to introduce when you copy JSON out of code or a terminal. When PrettyJSON spots one of them, it points to the location and offers a one-click repair that fixes the common cases for you.
Common questions and expert answers regarding this tool.
Valid JSON follows a few rules: keys and string values use double quotes, no comma after the last item, no comments, and values must be a string, number, object, array, boolean, or null. Single quotes and unquoted keys are not allowed.
It parses your JSON as you type and reports the first problem with its exact line and column, so you can jump straight to a missing brace, a trailing comma, or an unquoted key.
JavaScript objects allow single quotes, unquoted keys, comments, functions, and trailing commas. JSON is a stricter data format: double quotes around every key and string, and none of those extras.