Validate & Format · Runs in your browser
JSON Formatter
Beautify messy or minified JSON into clean, readable, consistently indented code — with 2 spaces, 4 spaces or tabs.
Paste, drop or type your JSON
It’s checked as you type — nothing is uploaded.
Ctrl + V to paste · drop a .json file anywhere here
Drop your JSON file to load it
Ctrl Enter ValidateCtrl Shift F FormatCtrl Shift M MinifyCtrl Z Undo
How to use it
- Paste minified or messy JSON into the editor, or upload a .json file.
- Pick an indent size and click “Format” (or press Ctrl + Shift + F).
- Copy the result or download it as a .json file. Ctrl + Z undoes the formatting.
Indentation
Choose 2 spaces, 4 spaces or tabs. Changing the setting re-formats valid JSON immediately, and your choice is remembered.
Sort keys
“Sort keys” orders every object’s keys alphabetically, at all levels — handy for stable diffs and reviews.
Folding
Click the arrows in the gutter to fold objects and arrays you don’t need to see.
More validate & format tools
All free, all private, all running locally in your browser.
JSON ValidatorFind and pinpoint syntax errorsJSON MinifierShrink JSON by removing whitespaceJSON Pretty PrintMake one-line JSON readableSort JSON KeysOrder keys alphabeticallyJSON RepairFix broken or AI-generated JSONJSON Error AnalyzerExplain why JSON won’t parseJSONC to JSONStrip comments and trailing commas