JSON Formatter

Paste in messy JSON and get it back readable, compact, or with its keys in order. If something is broken, you'll get the exact line and column instead of a shrug. Everything happens on this page — your data is never sent anywhere.

Settings

Output

How it works

Beautify reprints your JSON with line breaks and indentation so the structure is easy to scan — handy when you're hunting for a misplaced bracket. Minify does the opposite, stripping every unnecessary space for the smallest possible payload. Sort keys arranges object keys alphabetically at every level, which makes two files far easier to compare by eye.

Validation runs as you type. When the JSON is invalid, the error names the reason and the exact line and column where parsing gave up — usually a stray comma, a missing quote, or a comment that JSON doesn't allow.

One caution about sorting keys: it changes the bytes of the file. If that JSON is signed, hashed, or compared byte-for-byte against another copy, a sorted version will no longer match. The meaning is identical; the file is not.

Limitation: if an object contains the same key twice, JSON keeps the last value and drops the earlier one silently. This tool follows that rule and won't warn you about the duplicate — so check for repeated keys before you trust a large file.