How the JSON formatter works
Paste JSON into the box and the tool validates it and pretty prints it with clean two space indentation, or minifies it to a single line. If the JSON is invalid it tells you what went wrong, so you can fix a stray comma or missing bracket quickly. Everything runs in your browser, so your data is never sent anywhere.
Format versus minify
Formatting adds indentation and line breaks to make nested structures readable, which is ideal when you are debugging an API response or editing a config file. Minifying strips all that whitespace to produce the smallest valid output, which is what you want before sending JSON over the wire or embedding it where size matters.
Validating JSON
JSON has strict rules: keys and strings use double quotes, no trailing commas, and only specific value types. The tool parses your input with the same engine browsers use, so if it passes here it is valid JSON. The error message points to the problem, which is usually a missing quote, comma, or brace.
Privacy and common uses
Because formatting happens locally in your browser, you can safely paste sensitive payloads without them leaving your device. Developers use it to read API responses, tidy configuration files, prepare fixtures for tests, and spot structural mistakes. The output stats show the size and how many top level keys the object has.
Frequently asked questions
Is my JSON sent to a server? No, all formatting and validation happen locally in your browser.
Why is my JSON invalid? Common causes are single quotes, trailing commas, or unquoted keys; the error message gives a hint.
What is minifying? Removing all whitespace to produce the smallest valid single line version.
Related tools: Base64, Unix Timestamp, Hex to RGB.
