JSON formatter / minifier / validator
Paste any JSON to beautify, minify and validate it. Choose the indent, sort keys, escape or unescape strings — all processed locally in your browser.
Input
Waiting for inputResult
JSON essentials
JSON (JavaScript Object Notation) is a text format for structured data with exactly six value types: object, array, string, number, boolean and null. Its strictness is the point — because the grammar has no ambiguities, every language can parse it with a small, fast parser.
The rules that most often trip people up: keys and string values must use double quotes; there must be no trailing comma after the last property or element; comments are not allowed; and numbers cannot be NaN, Infinity or have a leading zero. If validation fails here, the error message points at the character position where parsing stopped, which is almost always just after the real mistake.
Formatting re-serialises the same data with indentation, which is a readability change only — it does not alter the parsed value. Minifying strips insignificant whitespace; that is what you want for request bodies, config files and anything sent over the wire. On large payloads the difference is often 30–50%.
Escaping turns JSON into a single-line string you can embed inside a source file or another JSON document; unescaping reverses it. This matters when you are pasting a payload into a test fixture, an environment variable or a CI config.
Numbers deserve a note: JSON has one numeric type, so a 64-bit integer from a backend can lose precision when parsed into a JavaScript number. If you are handling IDs or monetary amounts above 253, keep them as strings.
Because parsing here happens in your browser, it is safe to paste API responses, tokens and production data — nothing is transmitted anywhere.
Frequently asked questions
What does “format” actually do?
It re-serialises your JSON with consistent indentation so it becomes readable, without changing the data. Minify does the opposite: it removes all insignificant whitespace to make the payload smaller.
Why does my JSON fail validation?
The usual causes are single-quoted keys, a trailing comma after the last property, comments, or an unescaped control character inside a string. JSON requires double quotes around keys and string values.
Is my data uploaded?
No. Parsing, formatting and validation all happen in your browser. Nothing you paste leaves your device.