JSON Formatter, Validator and Minifier
Paste your JSON below to instantly pretty-print, validate or minify it. Everything runs locally in your browser — your data is never sent to any server.
Paste your JSON below to instantly pretty-print, validate or minify it. Everything runs locally in your browser — your data is never sent to any server.
JSON (JavaScript Object Notation) is the most widely used text format for exchanging structured data over the web — APIs, configuration files, log records, NoSQL documents and much more. Real-world JSON often arrives minified or with inconsistent indentation, which makes it hard to read and to debug.
A JSON formatter takes any valid JSON document and rewrites it with consistent indentation, predictable line breaks and (optionally) sorted keys. The reverse operation, minification, removes every byte that is not strictly required, which is useful before sending data over the network or embedding it in a binary.
No. Every formatting and validation operation runs entirely in your browser using the native JSON parser. Your input never leaves your machine, which makes the tool safe to use even with sensitive payloads.
There is no hard limit beyond what your browser's memory allows. In practice, files up to a few hundred megabytes work, although the UI can become sluggish past a few tens of megabytes. For huge files, prefer a desktop tool like jq.
Most often it is a missing or extra comma, an unquoted key, single quotes instead of double quotes, or a trailing comma after the last item. Check the byte position reported in the error message — it points exactly at the first invalid character.
It alphabetises the keys of every object in your JSON, recursively. Sorted output is useful for diffs, deterministic hashing, or when comparing two JSON documents that should be semantically equivalent.
Numbers are reformatted using the JavaScript number type, which provides about 15-17 significant decimal digits. If your JSON contains very large integers (e.g. 64-bit IDs), they may lose precision when re-serialised. Such IDs are typically transmitted as strings for that reason.