JSON Validator
JSON Validator — paste JSON, catch syntax errors with line and column, then pretty-print or minify. Runs in browser. Free, no signup.
About JSON Validator
JSON Validator is a no-frills tool for confirming that a chunk of JSON is well-formed — and finding exactly where it isn’t if it’s not. Paste your JSON, see a green “Valid” pill or a red “Invalid” pill with the error’s line and column, then use Pretty-print or Minify to reformat. Everything runs locally in your browser.
When you’d use a JSON validator
The most common cases: an API request keeps failing with a vague “Bad Request” error and you suspect the payload is malformed; you’re hand-editing a config file and want to verify it before saving; you’re inspecting an API response that doesn’t look right; you copied JSON from a logs panel or chat thread and lost track of the closing brace; you’re writing test fixtures and want to confirm they parse before the test does.
Browser-based validation is faster than running the JSON through curl-and-check or pasting it into your editor — and unlike most online validators, this one shows the exact line and column of the error with a code snippet so you can find the problem immediately.
What “strict JSON” means
The validator uses JSON.parse, which enforces the strict ECMA-404 JSON spec. That means:
- Keys must be in double quotes —
"name", nevernameor'name' - No trailing commas —
{"a": 1, "b": 2}is valid;{"a": 1, "b": 2,}is not - No comments — JSON has no
//or/* */ - Strings must use double quotes — single quotes are invalid
- Numbers can’t have leading zeros or trailing dots —
01and1.are invalid - All characters in strings must be properly escaped — literal newlines, tabs, and backslashes need to be
\n,\t,\\
If a parser somewhere accepts your “JSON” but this validator rejects it, the parser is being lenient and you’re probably going to hit a different parser somewhere downstream that won’t be.
Pretty-print vs minify
Pretty-print produces the readable form — 2-space indent, one key per line, like you’d want in a config file or to paste into a Slack message. Minify produces the smallest valid output — useful for embedding JSON in a URL query string, packing into a build artefact, or anywhere file size or character count matters. Both produce semantically identical data; they’re just whitespace transformations.
Free, no signup, runs entirely in your browser.
Frequently asked questions
Strict JSON.parse compliance — the same rules a backend or API gateway will apply when accepting your JSON payload. That includes: balanced braces and brackets, double-quoted keys (not single quotes), no trailing commas, no JavaScript-style comments, valid escape sequences in strings, and valid number formats. If it passes here, it passes anywhere.
Down to the exact line and column. When validation fails, you get the error message from the parser, the line and column number, and a visual snippet showing the offending character with a caret beneath it. This is the same kind of pinpoint error you'd see in a code editor.
Pretty-print formats your JSON with 2-space indentation and line breaks — readable for humans. Minify strips every space and newline to produce the smallest valid output — useful when you're embedding JSON in a URL, config file, or anywhere bytes matter. Both produce the same data; they just differ in whitespace.
No. Everything runs in your browser — the validator never uploads or transmits your JSON. This matters if your data contains credentials, internal API responses, or anything else you don't want sitting on a third-party server.