It looks like your browser language isn't English. Would you like to switch to the Traditional Chinese version? 切換到繁體中文 ×

JSON Formatter

security Security & Privacy Guarantee

Built for developers, this tool runs 100% locally in your browser. Your JSON never leaves your device — there is no backend database, keeping every test fully compliant with data-security best practices.

Result

Waiting for input...

FAQ

Q: How is this different from the JSON Encode / Decode tool?

A: JSON Encode / Decode works on a single JSON string literal (matching PHP's json_encode($string) / json_decode($jsonString)) — wrapping plain text into a quoted, escaped string or unwrapping one. This tool works on a whole JSON document (an object or array) — it pretty-prints, compacts, or validates it. They solve different problems.

Q: Why does it say my JSON is invalid when it looks fine?

A: The most common causes are a trailing comma after the last item, single quotes instead of double quotes, unquoted object keys, or comments (JSON has no comment syntax) — all valid in JavaScript object literals but not in strict JSON. The error message shows the line and column where parsing failed.

Q: Why did the \uXXXX escape sequences in my JSON turn into actual characters after Beautify/Minify?

A: This tool reformats using JSON.stringify(), which never re-escapes non-ASCII characters — a \uXXXX sequence and its literal UTF-8 character are exactly the same JSON value. So pasting PHP's json_encode() default output (which escapes Chinese, Japanese, emoji, etc. as \uXXXX) shows the readable characters after reformatting. If you specifically need the \uXXXX-escaped form back, use JSON Encode / Decode and check "Escape Unicode".

Done