loot.tools

JSON Formatter & Validator

Paste messy or minified JSON and get it back clean, indented, and easy to read - or minify it down to a single line. If the JSON is broken, you get the precise line and column of the first problem and a plain description of what's wrong, instead of a vague 'unexpected token'. Choose 2-space, 4-space, or tab indentation, optionally sort every object's keys A-Z, and copy the result. It all runs in your browser, so even sensitive payloads never leave your machine.

Paste JSON to pretty-print, minify, or check it. If it's broken, you get the exact line and column of the first problem. Everything runs in your browser, so nothing you paste leaves the page.

Input
Output

Format or minify, your call

Pretty-printing adds the line breaks and indentation that make nested JSON readable, which is what you want when you're reading an API response or a config file. Minifying strips every bit of whitespace for the smallest possible payload, which is what you want before you ship it over the wire. This does both from the same paste box, and you can switch indentation between two spaces, four spaces, and tabs to match your project's style.

Errors that point at the problem

A single missing comma or stray quote breaks a whole document, and most parsers just say 'unexpected token' without telling you where. This walks the text and reports the exact line and column of the first thing that isn't valid, so you can jump straight to it. Once the JSON parses cleanly, you get a quick read on how many keys it has and how deeply it nests.

When this helps

  • Cleaning up a minified API response so you can actually read it
  • Tracking down the one character that's making a config file fail to load
  • Sorting object keys so two JSON files diff cleanly
  • Shrinking a payload before pasting it into code or a request
  • Sanity-checking JSON you hand-edited before you commit it