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.

Formatting (or "beautifying") JSON re-indents it with consistent spacing and line breaks so it is easy to read, while minifying strips that whitespace to make the file smaller; validating checks that the syntax is correct. Paste your JSON and click Format to pretty-print it, Minify to compress it to one line, or Validate to find the exact line of any error.

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? Formatting and minifying only change whitespace and indentation, and values are never changed. Key order is kept as you typed it, with one exception: JavaScript's JSON engine always moves object keys that look like array indices (e.g. "0", "1", "10") to the front, in ascending numeric order, per the JSON/JS specification, regardless of where they appeared in your input. This only affects all-digit keys; ordinary string keys are untouched.

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.

Related tools