About this tool
Paste messy or minified JSON to pretty-print it, check it is valid, find the exact line and column of syntax errors, or minify it for production.
How to use the JSON Formatter & Validator
- Enter the action, indent, sort keys and json.
- The result appears in the output box as you type.
- Copy the output or download it as a file.
How it works
Input is parsed with the browser’s standards-compliant JSON parser (no code is executed), then re-serialised with your chosen indentation. Sorting is recursive.
Frequently asked questions
Is my JSON sent anywhere?
No, it is processed entirely in your browser.
Does it accept comments or trailing commas?
No — those are not valid JSON (they are JSON5/JSONC). The validator will point to them.