JSON Formatter & Validator.
Validate, pretty-print and minify JSON with exact error positions — entirely in your browser.
Format or minify — the result appears here.Strict by design
JSON's grammar (RFC 8259) is deliberately tiny: double-quoted strings, no comments, no trailing commas, and exactly six value types. That strictness is why every language can parse it identically — and why editors that accept relaxed variants (JSONC, JSON5) can lull you into writing files that real APIs reject. This validator applies the strict rules and tells you the exact line and column where parsing fails.
The errors everyone makes
- Trailing comma — [1, 2, 3,] is invalid JSON.
- Single quotes — strings and keys need double quotes.
- Comments — // and /* */ do not exist in JSON.
- Special values — NaN, Infinity and undefined are not valid JSON values.
Format for humans, minify for machines
Indentation is purely cosmetic: a formatted and a minified document carry identical data. Pretty-print when you debug an API response or review a config; minify when the payload ships over the network — for large documents the whitespace alone can be a double-digit percentage of the size (this tool shows you exactly how much).
Sorted keys, stable diffs
JSON object members are officially unordered, so sorting keys alphabetically never changes the meaning — but it makes two documents comparable at a glance and keeps version-control diffs quiet. Useful before committing config files or comparing two API responses side by side.
Frequently asked questions
Why is my JSON invalid?
Does JSON allow comments?
Why are trailing commas not allowed?
What is the difference between formatting and minifying?
Is it safe to paste confidential JSON here?
How large can the JSON be?
Does sorting keys change my JSON's meaning?
Free tools from a European software company.
- Runs in your browser
- Made & hosted in the EU
- No account needed