Developer Tools

{ } JSON Formatter & Validator

Format, minify, validate, and explore JSON — with error messages that actually tell you what's wrong.

Your JSON never leaves your browser — no uploads, no server storage, no "recent links" history.

Everything runs client-side. No account, no login, no tracking of anything you paste here.

Indent

Input

Waiting for input…
1

Validation runs automatically as you type. Very large inputs skip live-checking for smoother typing — click Format, Minify, or Validate to check them on demand.

Common JSON errors this catches

Most “invalid JSON” errors come from a short list of repeat offenders. Here is what the validator flags, and how it words it:

  • Trailing comma — the most common cause, usually from copy-pasting a JavaScript object or array literal. The tool flags it precisely: Trailing comma before "}" — remove the extra comma or add another property. Arrays get the same message with "]" and “add another value.”
  • Comments (// or /* */) — not valid JSON. Common when pasting from a .jsonc config (like VS Code’s settings.json) or a JavaScript file. Tool message: JSON doesn't support comments — remove the "//" comment.
  • Single quotes instead of double quotes — strings and object keys each get their own message (Strings must use double quotes… vs. Object keys must use double quotes…).
  • undefined, NaN, or Infinity — all valid in JavaScript, none valid in JSON. For undefined the tool suggests null instead.
  • Leading zeros in numbers — 012 isn’t valid JSON (12 is). Easy to hit when pasting a phone number or zip code as a bare number instead of a string.
  • A raw line break inside a string — strings can’t contain a literal newline; use \n instead.
  • Missing quotes around a key — { name: "Ada" } needs { "name": "Ada" }.
  • An unescaped quote inside a string — the parser sees the string end early and reports the next problem it hits, often a missing comma. Escape the inner quote as \".

Frequently asked questions

Why does my JSON have comments or trailing commas that other tools accept?

You’re probably looking at JSON5 or JSONC (used in files like VS Code’s settings.json) — both are supersets of JSON that allow comments and trailing commas, but they aren’t valid standard JSON. This tool validates against strict JSON (RFC 8259), so it will flag both as errors — that’s expected, not a bug.

More from Developer Tools

View all →
Base64 Encoder/Decoder Encode or decode Base64 strings instantly. Regex Tester Test patterns against real strings, with a plain-English explanation. UUID / GUID Generator Generate v1, v4, and v7 UUIDs instantly.

Enjoyed this? Share it with a friend

Email