What This Tool Does
Paste JSON, drop a file, or type it directly, then format, validate, or minify it — entirely in your browser. A WebAssembly module built from Rust does the parsing and rewriting inside your browser tab, so your JSON is never uploaded to a server: nothing about its contents leaves your device at any point.
How to Use It
Paste your JSON into the input box, or load it from a file. Pick an indent width (2 spaces, 4 spaces, or a tab), or switch on Minify to collapse everything onto one line instead. Turn on Sort keys if you want every object's keys arranged alphabetically. Click Format, then read the result: a clean parse shows your formatted output plus any warnings, while invalid JSON shows the exact line and column where parsing failed. Copy the result or download it once you're happy with it.
Why Numbers Survive Here
Open a very large integer like 12345678901234567890 in a typical browser-based JSON tool and watch what comes back out: 12345678901234568000. The last several digits are gone, replaced with zeros, even though nothing in the tool's UI ever warned you. That happens because most JSON tools parse with JavaScript, and JavaScript represents every number — however it's written in the source — as a 64-bit floating-point double. A double can only carry about seventeen significant digits safely, so anything longer gets silently rounded to the nearest value a double can represent, and re-serializing that rounded value produces a different number than the one you typed in.
This formatter avoids that entirely by parsing with Rust's serde_json library in arbitrary-precision mode, which keeps each number's exact source text instead of converting it to a double first. A giant integer like the one above, or a long decimal with twenty significant digits, comes back out exactly as it went in — byte for byte, digit for digit. The one place this can't help you is downstream: if you copy the formatted output into a tool that itself uses JavaScript numbers, that tool will still round it. The guarantee here is only that this formatter itself never introduces that corruption.
Duplicate Keys: Last Value Wins, With a Warning
JSON's grammar technically allows the same key to appear more than once inside a single object, even though most people never write JSON that way on purpose. When it happens, every JSON parser — including the browser's own JSON.parse — resolves it the same way: the last value written for that key wins, and every earlier value for the same key is silently thrown away. This formatter follows that identical rule, so its output always matches what any other standard JSON parser would produce.
What it adds is visibility. Before formatting, the input is scanned specifically for repeated keys, and if one turns up, a warning names the key and the exact path to the object it appeared in — so you find out a value was dropped instead of only noticing later that a field held a value you didn't expect.
Formatting Options
- Indent — choose 2 spaces, 4 spaces, or a tab for pretty-printed output.
- Minify — collapse the entire document onto a single line with no extra whitespace, for the smallest possible output.
- Sort keys — reorder every object's keys alphabetically, recursively through the whole document, regardless of how they were ordered in your original input.
Minify and Sort keys are independent of each other: switching on Minify by itself never reorders anything, it only removes whitespace. Your keys stay in the exact order you wrote them unless Sort keys is also turned on.
Limits
Input is capped at 10 MB. A file or pasted text past that size is rejected immediately with a clear message, before any parsing is attempted, so you're never left waiting on a browser tab that's silently run out of memory.
Where to Go Next
If you need to pull specific fields out of a JSON document, reshape an array of objects, or filter records by a condition rather than just format one, the jq tool runs real jq-style filters on your JSON in the same browser-only way — worth knowing, though, that jq's own number handling isn't byte-exact the way this formatter's is, so for reformatting without any risk to large numbers, this page remains the one to use.