Loading tool…
Paste JSON to pretty-print it with clean indentation, or minify it to a single compact line. Invalid JSON is reported with the parser's error message.
Loading tool…
JSON is a free, private online tool that lets you beautify, validate and minify JSON in your browser. It runs entirely in your browser, so nothing you enter is uploaded to a server.
Privacy: this tool runs entirely in your browser. Your input is never sent to, received by, or stored on any server — there are no uploads and no tracking of what you enter.
JSON (JavaScript Object Notation) is a lightweight, human-readable data-interchange format built from objects, arrays, strings, numbers, booleans and null. It's the de-facto format for web APIs and config files.
Beautify adds newlines and 2-space indentation so JSON is easy to read and diff. Minify strips all unnecessary whitespace to reduce payload size for storage or transport.
If your input isn't valid JSON, the tool shows the exact parse error (for example a trailing comma or unquoted key) so you can fix it quickly.
JSON (JavaScript Object Notation) is a lightweight, text-based data-interchange format. Despite the name it is language-independent and is now the default way that web APIs, configuration files and databases exchange structured data. Its success comes from simplicity: it has just a handful of types — objects (key/value maps), arrays (ordered lists), strings, numbers, booleans and null — yet that is enough to model almost any data, and it maps cleanly onto the data structures of nearly every programming language.
The same JSON can be written two ways. Beautified (pretty-printed) JSON adds indentation and line breaks so humans can read and diff it — ideal during development and debugging. Minified JSON strips every unnecessary space and newline to shrink the payload, which matters in production where smaller responses mean faster page loads and lower bandwidth. This formatter does both, and lets you choose 2-space, 4-space or tab indentation to match your codebase's style.
When you paste text, the tool runs it through a strict JSON parser. If the syntax is valid it rebuilds the data and re-serialises it with your chosen formatting. If not, it reports the exact error — a missing comma, a trailing comma, single quotes instead of double quotes, or an unquoted key. These are the four most common JSON mistakes, and seeing the precise location turns a frustrating hunt into a one-second fix.
Object key order is not significant in JSON, but it matters for humans and for version control. If two API responses contain the same data in a different key order, a naive text diff lights up with noise. The Sort keys option alphabetises every key at every nesting level, so when you diff two sorted documents only genuine value changes appear. It is also handy for producing canonical, reproducible output.
Standard JSON forbids comments, trailing commas, single-quoted strings, and values like NaN or undefined. Numbers cannot have leading zeros or a leading plus sign. These restrictions keep parsers simple and interoperable. If you need comments or trailing commas, you are looking at a superset such as JSON5 or JSONC (used in some config files) — convert those to strict JSON before sending them to an API.
Everything in this formatter runs in your browser with the native JSON engine, so even confidential API responses, auth tokens or customer records never touch a server. Because it works in memory, very large documents are limited only by your device's RAM, but typical API payloads format instantly. You can copy the result or download it as a .json file.