JSON Formatter
Paste JSON to pretty-print it instantly. Invalid JSON is flagged with the line and column of the problem, and you can minify or sort keys in one click.
How to use the JSON Formatter
- Paste your JSON into the input panel, drop a file onto it, or load the sample.
- The formatted result appears on the right as you type. Change the indent size at any time.
- Copy the result or download it as a file. Press Ctrl/⌘ + Enter to format immediately.
Features
- Validates JSON and reports the exact line and column of syntax errors
- Minify JSON to a single line for payloads and config
- Sort object keys alphabetically for stable diffs
- Formats as you type
- Copy, download and drag-and-drop file support
- Remembers your last input on this device
- Light and dark themes
Frequently asked questions
How do I find an error in my JSON?
Paste it into the input. If it is invalid, the formatter shows the parser message together with the line and column where parsing failed, so you can jump straight to the missing comma, quote or bracket.
Can I minify JSON as well as beautify it?
Yes. Use the Minify button to remove all whitespace, or pick an indent size of 2, 4 or 8 spaces or tabs to beautify it.
Is my data uploaded to a server?
No. Everything runs locally in your browser. Your input never leaves your device, so it is safe to use with private or proprietary data.
Is Formatter free?
Yes. Every tool is free to use with no sign-up and no limits. A few ads around the tools keep the site running; they never appear inside the editors.