JSON Formatter & Validator
Format, validate, and minify JSON instantly — syntax highlighting, auto-format on paste, and one-click download. Runs entirely in your browser.
This tool formats, validates and minifies JSON in your browser. Paste raw JSON to get an indented, readable version with syntax errors reported by line and position, or minify it to strip whitespace for transport. Nothing is sent to a server, so it is safe to use on payloads containing real data.
Input
Loading editor…
Outputread-only
Loading editor…
About this tool
A fast, privacy-first JSON formatter that works offline. Paste raw JSON from an API response, config file, or log — it validates immediately and auto-formats on paste. Use Format to pretty-print with 2 or 4-space indentation, or Minify to strip all whitespace. Download the result as a .json file or copy it to the clipboard.
The editor uses Monaco (the engine behind VS Code) for syntax highlighting, line numbers, and bracket matching. Your data never leaves your device.
How to use
Paste your JSON
Paste raw JSON into the editor. It validates immediately and auto-formats on paste if the input is valid.
Format or Minify
Click Format to pretty-print with indentation, or Minify to strip all whitespace for the smallest possible output.
Adjust indent size
Use the indent toggle in the toolbar to switch between 2-space and 4-space indentation before formatting.
Copy or Download
Click Copy to copy the result to clipboard, or Download to save it as a .json file.
At a glance
- Operations
- Format with indentation, validate, and minify
- Error reporting
- Syntax errors are reported with line and position, not just a generic failure
- Parser
- The browser's own JSON parser, so behaviour matches what your code will see
- Minify
- Strips whitespace for transport; the parsed value is identical
- Safe for real data
- Nothing is sent to a server, so payloads containing production values can be pasted here
Sources & references
- MDN — JSON — The parsing behaviour this tool relies on
- RFC 8259 — The JSON Data Interchange Format — The specification itself
Related tools
Frequently asked questions
Common questions about the JSON formatter and validator.
Last updated
