A JSON validator answers one question: is this string legal JSON? It does not indent the value and it does not try to “fix” it. On this page a successful parse reports a clear valid result and the kind of value (object, array, string, number, boolean, or null). A failed parse reports invalid JSON and the browser error, with an approximate line and column when the message includes a position.
That is a different job from a JSON formatter. Format is useful after the string is valid. Validate is useful when you do not know yet — a broken API body, a hand-edited config, or a log line that almost looks like JSON. Rewriting the box on failure would hide the source. This tool leaves your text alone.
Validation uses the same parser the browser already has. There is no custom grammar and no attempt to accept comments or trailing commas. If a library in your stack is more lenient than JSON, this page will still say invalid. That is the point: you see what JSON.parse will do.
Whitespace-only input is not treated as valid JSON. A JSON value can be a lone null or 0; it cannot be an empty field. If you need indentation after a valid result, open the JSON Formatter and format the same string there.
This nested object is valid JSON. Validate reports a JSON object and leaves the text unchanged:
{
"name": "YallaSolve",
"ok": true,
"tags": ["json", "tools"],
"nested": { "path": "a\"b" }
}
This fragment is not JSON. Validate reports invalid and keeps the fragment in the box:
{"name": "Ada",}
The trailing comma is the usual first token. Fix it, then validate again. Do not minify or format as a way to hide that error.
Validate asks whether the string is JSON. Format asks for whitespace after a successful parse. A formatter that only rewrites on success still tempts people to treat the output as the source of truth. Keep the jobs on separate pages so the search intent stays clear.
Use this JSON validator when you need a yes-or-no answer. Use the JSON Formatter when the payload is valid and you need to read nested objects. Minify is a third action: smaller valid text for APIs and logs, never a repair step.
\x is not a JSON escape)The first unexpected token is where you start. There may be more errors after it. Validate after each fix. If the message includes a position, the status also names an approximate line and column.
The check runs in this browser. The string is not posted to YallaSolve for validation. Tokens and customer payloads stay in the tab until you clear them or leave the page. That is the same model as the formatter on this site.
No. The validator asks you to paste JSON first. An empty box is not a JSON value.
No. Valid or invalid, the box stays as you left it. Only the result and status change.
Object literals allow unquoted keys, single quotes, comments, and trailing commas. JSON does not. This page checks JSON, not JavaScript.
They are derived from the browser parse position when the message includes one. Use them as a hint, then read the token.
Format will not rewrite invalid text on this site. Validate first, fix the token, then format if you need indentation.
No. Validation runs in the browser with JSON.parse.