JSON Formatter & Validator

  • Free · runs in your browser
  • Nothing is uploaded or stored

Paste JSON to format, minify, and validate it instantly — and when it’s invalid, this tool tells you why, where, and how to fix it, in plain English. Everything runs in your browser; nothing is uploaded or stored.

How this JSON formatter is different

  • It explains the error, not just flags it. Instead of “Unexpected token”, you get “Missing comma before "b" — insert a comma to separate it from the previous value.”
  • It points at the exact character with a caret, so you don’t scan the whole file.
  • It shows where you are in the structure — a breadcrumb like glossary › GlossDiv › GlossList plus a tree of what parsed successfully.
  • It counts brackets for you. For “unexpected end of input” it says exactly which } or ] to add, and won’t tell you to break a bracket that’s actually needed.
  • It understands escaping. It handles the genuinely hard cases — unescaped quotes, backslash counting, Windows paths, broken \u unicode — and can suggest a fix.
  • It’s 100% private. Everything runs in your browser; your JSON never leaves your machine.

What this JSON validator does

  • Format & beautify — pretty-print JSON with 2-space, 4-space, or tab indentation.
  • Minify — strip whitespace to the smallest valid JSON.
  • Validate as you type — live checking with syntax highlighting.
  • Plain-English errors — instead of a cryptic parser message, it tells you things like “missing comma”, “unclosed bracket”, or “unescaped quote”, and points at the exact spot.
  • Structure location — a breadcrumb and tree show where in your JSON the error is.
  • Suggested fixes — for common escaping and quoting mistakes, it can preview a corrected version.

Common JSON errors — and what they mean

“Unexpected end of input” / unclosed bracket

You have more opening brackets than closing ones. The tool counts the open { and [ and tells you exactly which closers to add at the end.

“Missing comma” between values

Two values or key–value pairs sit next to each other with no comma between them, e.g. {"a":"x""b":"y"}. JSON requires a comma between every pair.

Trailing comma

JSON does not allow a comma after the last item, so {"a":1,} and [1,2,] are invalid — remove the trailing comma.

Single quotes instead of double quotes

JSON only allows straight double quotes. {'a':'b'} is invalid; it must be {"a":"b"}. Curly “smart” quotes are invalid too.

Unescaped quote inside a string

A " inside a string value closes the string early. To keep a quote as text, escape it as \", e.g. "She said \"hi\"".

Invalid escape (e.g. a Windows path)

Inside a string a backslash starts an escape, so "C:\Users\name" is invalid. Double each backslash: "C:\\Users\\name".

Comments are not allowed

JSON has no comments. Remove any // ... or /* ... */ before parsing.

Is my data safe?

Yes. This tool is 100% client-side — the JSON you paste never leaves your browser. There is no server call, no logging, and nothing is stored.

Frequently asked questions

Does this work offline?

Once the page has loaded, the formatting and validation run entirely in your browser, so it keeps working without a connection.

Is there a size limit?

There’s no hard limit, but very large files (many megabytes) may format more slowly because everything runs in the browser.

Why does \u00e9 turn into é when I format?

That’s normal. When JSON is parsed and re-serialized, a Unicode escape like \u00e9 becomes the equivalent character é. Both are valid.