JSON Formatter
Paste JSON and get it pretty printed, minified, or compared with a second value. Everything runs on your device - nothing is ever uploaded.
Runs entirely on your device - nothing is ever uploaded.
More tools
- Base64 Encode/Decode Encode text to Base64 and decode it back. Get started
- URL Encoder Percent-encode text for safe links and queries. Get started
- UUID Generator Generate random UUID v4 identifiers in bulk. Get started
- SHA Hash Generator SHA-256 and SHA-1 hashes of text or files. Get started
- QR Code Generator Turn any link or text into a downloadable QR PNG. Get started
- Password Generator Strong random passwords, made on your device. Get started
- Unit Converter Length, weight, temperature, and more. Get started
- Speed Converter kph, mph, m/s, knots, and Mach. Get started
How to use JSON Formatter
- Paste your JSON on the left - or Upload a .json file. Live mode formats as you type.
- Click Format to pretty print, Minify to compress, Validate to check, or Repair to auto-fix trailing commas, comments and single quotes.
- Switch to Tree to explore nested data, or Diff and paste a second JSON value to see what was added, removed, or changed.
What it is for
A JSON formatter turns a compressed wall of text into readable, indented structure, and catches the missing comma or bracket that breaks an API response or config file. Developers use it daily to inspect payloads and fix broken JSON.
How it works
The text is parsed with your browser's built-in JSON parser. Valid input is re-printed with your chosen indent or minified; invalid input shows the error with its line and column so you can find the exact spot. Diff compares two parsed values: object keys by name, and array items by position. The stats line reports the type, key count, nesting depth and byte size. Nothing leaves your device.
When JSON breaks
Almost every JSON error is one of four slips: a trailing comma after the last item, a comment pasted from documentation, single quotes instead of double, or a missing bracket. The Repair button fixes the first three automatically and re-validates; if the structure itself is broken, the line-and-column error points at the spot to fix by hand.