Tools Berry

JSON Formatter & Validator

Beautify messy JSON, minify it to one line, or validate it and get the exact line where it breaks. Paste below — everything runs in your browser and nothing is uploaded.

Your JSON stays in your browser — nothing is sent anywhere.

How to use the JSON formatter

Paste any JSON — an API response, a config file, a copied snippet — into the box. Press Format to pretty-print it with clean, consistent indentation, choosing 2 spaces, 4 spaces or tabs to match your code style. The result replaces the text in place, so you can copy it straight back out.

Need the opposite? Minify strips every insignificant space and line break to give you the smallest valid JSON on a single line — useful for embedding in source code or trimming a request body. Validate simply checks whether the text is well-formed JSON without changing it.

When something is wrong, you get the parser's message along with the line and column of the failure, so you can find the missing comma, stray quote or unclosed bracket without hunting line by line.

Everything runs in your browser with the built-in JSON parser — the data you paste is never uploaded.

Common questions

Does it accept JSON5, comments or trailing commas? No. This validates strict, standard JSON — the same rules browsers and most servers use. Comments and trailing commas are reported as errors so your output stays portable.

Will it reorder or change my data? No. Formatting and minifying only change whitespace and indentation. Keys, values and array order are preserved exactly.

Why did my numbers lose trailing zeros? JSON has no concept of trailing zeros, so 1.50 is the same number as 1.5. The formatter prints the canonical numeric form.

Is anything saved or uploaded? No. The tool is fully client-side — your JSON never leaves your browser and nothing is stored.

More free tools