JSON Formatter
Format, validate, minify and tree-view JSON.
Runs on this deviceSent to a server: 0 bytes
How it works
- Type, paste or pick what you're working with.
- Set the options you need.
- Copy or download the result. It's made on this device.
Pretty-prints JSON so it can be read, validates it so you find out exactly where it breaks, and minifies it again when you need it small. The tree view is usually the fastest way to find one value inside a large response.
What validation checks
JSON is a stricter format than it looks. Keys must be in double quotes, strings cannot use single quotes, there are no trailing commas, no comments, and no unquoted identifiers. The error reported is the first point where the text stops being valid JSON — which is often just after the actual mistake rather than exactly on it.
The usual culprits
{'name': 'Ada'} is not JSON — single quotes are a JavaScript habit. Neither is {"a": 1,} with its trailing comma, nor a file with // comments in it. All three are valid JavaScript object syntax, which is precisely why they get pasted into JSON files.
Large numbers lose precision
JSON numbers have no size limit, but every browser parses them as 64-bit floats, so an integer beyond about 9 quadrillion (2⁵³) silently loses accuracy — a 19-digit Twitter or database ID will come back subtly wrong. Anything that must survive a round trip exactly should be carried as a string. Reformatting will not warn you, because nothing invalid has happened.
Questions
Why does my JSON fail to validate when it looks fine?
Almost always single quotes, a trailing comma before a closing brace, a comment, or an unescaped character inside a string. JSON permits none of the four, even though JavaScript permits all of them.
Is my data sent anywhere to be formatted?
No. Parsing and formatting happen in your browser tab, which is why this is safe to use on a production API response containing real customer data.
Is JSON Formatter free to use?
Yes. JSON Formatter is completely free, with no account, no sign-up and no usage limits.
Are my files or data uploaded anywhere?
No. JSON Formatter runs entirely in your browser. Your files, text and numbers are processed on your own device and are never uploaded to a server.
Does JSON Formatter work offline?
Yes, once you have opened it. NWS Kit installs as a Progressive Web App and keeps working with no connection. Video and audio tools download their engine (about 32 MB, from nwskit.com) the first time one is used; save the Video and audio pack to have it ready offline.
Do I need to install any software?
No installation is required. JSON Formatter works in any modern browser on desktop or mobile.