Developer tool · Free & no sign-up

JSON Validator

Paste JSON to check it instantly: valid or invalid, with the exact line and column of any error, plus a formatted, copyable output at 2-space indent.

Advertisement

Up to 200 KB. Validated in your browser; nothing is uploaded.

Advertisement

About this tool

JSON (RFC 8259) is the lingua franca of APIs — and one trailing comma in a 400-line response costs an hour of log-staring. This validator parses your input in the browser with a purpose-built scanner that reports the first error as an exact line and column, independent of engine-specific error wording, and offers instant pretty-printed and minified output with copy buttons.

How to use it: paste any JSON — an API response body, a config file, a webhook payload, a log line. Validation runs live as you type and on every keystroke pause. A green Valid badge parses and formats; a red Invalid badge names the problem and pins it to line:column, usually within a character of the true culprit. Use Copy formatted for 2-space-indented output, or Copy minified for payload-size-sensitive transports.

Worked example: paste {"a":1,} and the tool reports “Expected a string key in object at line 1, column 8” — right at the stray comma before the closing brace. Delete the comma and the same text parses into { "a": 1 } with a Valid badge. The scanner walks strings (including \uXXXX escapes), numbers (including exponents), literals true/false/null and nesting depth, which is why it catches the mistakes native engines report inconsistently across browsers.

What JSON cannot and will not tolerate: single-quoted strings, unquoted keys, trailing commas, JavaScript comments, NaN or Infinity, or Python’s True/None literals. If your config has comments, it is JSONC or YAML wearing a JSON costume — strip it or pick a tolerant parser, not this tool. Duplicate keys are legal per the spec and parse fine here, but they are a code smell: last-one-wins in most engines, which hides bugs.

The 200 KB cap, honestly: browsers parse megabytes instantly, but this page caps at 200 KB to keep typing responsive and payloads paste-friendly. For genuinely huge documents — API dumps, database exports — use a streaming parser or jq instead; the optional server endpoint enforces the same cap and exists for parity, not for big-data processing.

Questions readers ask

Q1Why does JSON reject single quotes?
RFC 8259 requires double-quoted strings. {'a':1} is syntactically valid JavaScript but is not JSON — every conformant parser rejects it, including this one.
Q2Does this support comments or trailing commas?
No — JSON forbids both. If you need comments, adopt JSONC/JSON5 in your toolchain and keep serialized payloads strictly RFC 8259; this tool deliberately holds the hard line.
Q3How large a file can I validate?
Up to 200 KB directly in the browser, covering virtually all API responses and configs. The optional server endpoint handles the same cap with identical results; larger inputs need jq or a streaming parser.
Q4Are duplicate keys allowed?
The spec permits them, so they parse here — but most engines keep only the last value, which masks bugs. Fix the generator, not the parser.
Q5Is my JSON stored on your server?
No. Validation runs client-side by default and nothing is logged, retained or shared — paste production payloads safely.
Q6What does the line and column mean exactly?
The 1-based byte position where parsing failed, converted via newline counting. It points at (occasionally one past) the offending character — usually a trailing comma, a missing quote or an unescaped control character.
Advertisement