JSON Formatter and Validator
Paste messy JSON and get it back readable - or minified for production. Syntax errors are reported with the exact line and column. Nothing is sent to a server.
All processing happens in your browser. Files are never uploaded to a server.
At a glance
- Processing
- In your browser - nothing is uploaded
- Price
- Free, no account
How to use
Paste your JSON into the input box.
Pick an indent width, or switch to Tab.
Click "Format" to beautify, or "Minify" to strip whitespace.
Copy the result.
Frequently asked questions
Does this validate my JSON?
Yes. Formatting parses the input first, so anything that formats successfully is valid JSON. If it is invalid you get the parser message plus the exact line and column where parsing stopped.
Why does my JSON fail when it looks fine?
The most common causes are single quotes instead of double quotes, trailing commas after the last item, unquoted keys, and comments. All four are valid JavaScript but not valid JSON.
What does minify do?
It removes every space and line break that is not inside a string, producing the smallest equivalent JSON. Useful for cutting payload size in APIs and config files.
Will the key order change?
Object keys keep their original order, with one exception: keys that look like array indices (non-negative integers) are moved to the front and sorted numerically. That is a rule of the JavaScript language itself, not something this tool does.
Is my data sent anywhere?
No. Parsing and formatting happen entirely in your browser. Your JSON is never uploaded, which matters when it contains API keys, tokens or customer data.
Is there a size limit?
There is no hard limit, but very large documents (tens of megabytes) may make the browser sluggish, since the whole structure is held in memory and rendered in a text area.
Related tools
- Base64 EncoderEncode text to Base64 and decode Base64 back to text, with URL-safe support.
- Hash GeneratorGenerate MD5, SHA-1, SHA-256 and SHA-512 hashes from text online for free.
- UUID GeneratorGenerate random UUID v4 identifiers online for free.
- Password GeneratorGenerate strong random passwords online for free.