JSON Formatter

Format, validate and minify JSON in your browser — nothing is uploaded.

Validation

Valid JSON


Characters

62

Paste or type JSON to format, validate, or minify.

Result
{ "name": "Toolbera", "tools": [ 1, 2, 3 ] }

This tool is a validator first — the status line pinpoints exactly why your JSON failed to parse. Whether you're formatting a response from an API, minifying a payload for transport, or debugging why your JSON won't parse, everything runs client-side so you can paste sensitive payloads without shipping them to a server. JSON has stricter rules than JavaScript object literals (trailing commas, unquoted keys, and single quotes are all forbidden), and this formatter tells you when you hit one.

Examples

Paste a minified API response like `{"name":"Toolbera","tools":[1,2,3]}` and pretty-print it at 2 spaces to see the structure clearly.

Format a large payload with newlines and indentation, then minify it back to a single line for transport or embedding in code.

FAQ

Why is my JSON invalid?

JSON has stricter rules than JavaScript. The most common culprits: trailing commas after the last item in an array or object, single quotes instead of double quotes around keys and strings, and unquoted keys (JSON requires all keys to be strings wrapped in double quotes). The error message pinpoints the exact spot.

Does formatting change my data?

No. Pretty-printing and minifying only rearrange whitespace — the data structure stays exactly the same. A formatted and minified version will parse to identical values.

Is my JSON sent anywhere?

No. Formatting and validation happen locally in the browser's JavaScript engine — no request goes out, so there is nothing on a server to log, inspect, or lose.