JSON Formatter
Beautify, minify and validate JSON, including escaped and non-standard input.
Runs fully in your browser. Nothing you paste here is sent anywhere.PrivateInput
Output
About this tool
Two editable panes side by side: paste on the left, read the formatted result on the right. Both sides have line numbers and syntax colouring, both stay editable, and the output updates as you type — there is no button to press before you can see the result. Tab indents, and selecting a bare key and pressing a quote wraps it rather than replacing it.
The parser is deliberately forgiving. A JavaScript object literal with unquoted keys, single quotes, comments or a trailing comma is accepted, so is a payload that arrived backslash-escaped, percent-encoded or wrapped in quotes by a log pipeline, and so is a stream of documents pasted one after another. Whatever it had to fix is reported in the status bar rather than applied silently, and the output is always strict JSON.
When a document cannot be parsed, the exact token is underlined in place, its line number turns red, and a single button scrolls to it and selects it. Errors are reported by line and column with a message that names what was expected, not a character offset. Integers too large for a double keep their digits, and duplicate keys are flagged instead of being quietly dropped.
Nothing you paste is transmitted. The page is static HTML and the parsing happens in your tab, which makes it safe for API responses, tokens and production payloads.
Frequently asked questions
Is my JSON uploaded to a server?
No. The formatter is plain JavaScript running in your browser. There is no backend endpoint, so your data never leaves your device — you can disconnect from the network and it still works.
Can it format escaped JSON, or JSON stored inside a string?
Yes. A payload that is backslash-escaped, double-escaped, percent-encoded, HTML-encoded or wrapped in quotes is decoded automatically, and a document that is only a JSON string holding JSON is unwrapped. For JSON kept inside a field of a larger document, turn on "Unwrap nested" — the status bar offers it whenever it finds one.
Does it support comments, trailing commas and unquoted keys?
Yes. Comments, trailing and missing commas, single quotes, unquoted keys, hexadecimal numbers and Python literals such as True and None are all accepted, and the status bar says the input was repaired. The output is always strict JSON, so comments are read but not written back.
How large a file can I format?
The limit is your browser memory rather than an upload cap. Documents of a few megabytes format in well under a second; past roughly 400 KB the syntax colouring switches off to keep typing smooth, and the text stays fully editable.
What does "sort keys" do?
It recursively reorders every object key alphabetically. That makes two payloads directly comparable, which is handy before diffing API responses that return keys in an unstable order.
Is it really free?
Yes, with no account and no usage limit. The site is funded by ads placed around the tool, never inside your working area.