WebBeautify

Validators

JSON Validator

JSON validate is the formatter’s stern sibling. Same parser, less poetry. You want to know whether the body is legal before you write a test that “works on my pretty-print.”

Input 0 B
Output

Drop a file on the left. Drafts stay in this browser. Shortcut: Ctrl or Cmd + Enter to run.

How this json validator works

  1. Paste or drop a .json file into the input on the left.
  2. Flip options if you see them (comments, indent, case). Defaults are the safe ones.
  3. Hit Run, or Ctrl / Cmd + Enter. Leave “Process on server” off unless you mean it.
  4. Read the status line, then copy, download, or jump to a related tool.

Fail closed

A green pass means json_decode / JSON.parse accepted the document. It does not mean the schema matches your OpenAPI file. For that you still need a schema checker. This page stops the cheap bugs: a trailing comma from a JS object, a comment from a tired human, a smart quote from a docs site.

When it passes, you get a pretty copy so you can look. When it fails, you get a reason. That is the whole product, and it is enough for most “is this even JSON?” nights.

Frequently asked questions

What does JSON validation check?

That the text is legal JSON: braces match, commas are legal, strings are quoted, no trailing comma, no comments. {"ok": true} passes. {ok: true} fails because ok is not a quoted key.

Is valid JSON the same as the right schema?

No. {"user": 1} is valid JSON and maybe the wrong type if you expected {"user": {"id": 1}}. Schema tools (JSON Schema, OpenAPI) are the next floor. This floor is syntax.

Example of a sneaky fail?

{"n": 1,} — trailing comma. Or {"n": NaN}. Or a BOM at the start of the file that some parsers choke on. Or a curly quote copied from Word instead of a straight "key".

Fun fact?

Fun fact: true, false, and null are lowercase in JSON. True from Python’s True dumped wrong will fail. That error has ended more than one “it works in my notebook” demo.

Validate then format, or format then validate?

If it might be illegal, validate first so you are not pretty-printing a guess. If it is a 1-line monster you cannot even look at, format first — but a strict formatter will still refuse bad JSON, which is good.

JSON Lint vs JSON Validator?

Same sport. Lint is the old search phrase (jsonlint). Validator is the plain English one. You want a parse error you can read, then a pretty tree if it passes.

Can duplicate keys pass?

The JSON spec says keys should be unique. Some parsers keep the last "id" if you wrote "id" twice. That is a silent bug. Prefer a parser that warns. Do not rely on duplicates on purpose.

Numbers like 1e400?

JSON allows the grammar of numbers; languages then overflow. A “valid” payload can still become Infinity in JS. Validation is syntax, not IEEE-754 therapy.