JSON Formatter
Beautify, minify, and validate JSON in your browser. Live updates, copy with one click — nothing leaves your device.
What does this tool do?
JSON (JavaScript Object Notation) is the most common format for data interchange between APIs, config files, and modern web apps. This tool parses JSON in your browser and re-emits it with consistent indentation (Beautify), strips all whitespace (Minify), or just confirms it parses (Validate). It uses the browser's native JSON.parse, so what passes here is what every JavaScript runtime will accept. Nothing is uploaded — the whole pipeline runs locally.
How to use it
Paste your JSON into the input area. Pick Beautify for human-readable output (set indent to 2, 4, or tab), Minify to strip whitespace for transport, or Validate only to check syntax without producing output. Toggle Sort keys A→Z to make diffing two JSON files easier. The output updates live as you type. If the input is invalid, the tool tells you the line and column of the error so you can jump straight to the problem.
Tips and limits
- JSON is strict: keys must be double-quoted, no trailing commas, no comments. If your input has those, fix them first.
- Sorted keys produce stable output for git diffs and snapshot tests.
- Beautified output with 2-space indent is the de-facto standard for config files (npm, composer, .vscode/settings.json).
- Very large payloads (10MB+) work but the browser may stutter while parsing — minify large API responses for production use.
- Numbers are parsed by JavaScript, which loses precision past 2^53. If you have BigInt-style IDs, keep them as strings.
Frequently asked questions
Is my JSON sent to a server?
JSON.parse and JSON.stringify. Open DevTools > Network and you'll see no requests fire when you paste or edit. Safe for sensitive payloads, internal config files, or anything you wouldn't paste into a hosted service.Why does my JSON show as invalid when it looks fine?
What's the difference between Beautify and Minify?
What does "Sort keys A→Z" do?
Does it handle JSON5, JSONC, or comments?
// or /* */), trailing commas, single quotes, and unquoted keys are all rejected. If you need a relaxed dialect for tooling configs, parse with a JSON5 library before pasting here, or strip the comments first. We may add a JSON5 mode in the future.Can it handle very large JSON files?
JSON.parse is synchronous. For multi-hundred-megabyte logs or exports, use a streaming command-line tool like jq instead — it processes JSON as a stream and won't load the whole file into memory.
EN
PT
ES