線上格式化、美化和驗證 JSON,對無效輸入給出清晰的錯誤提示。
如何使用 JSON 格式化
將您的 JSON 貼上或輸入到輸入面板。
點擊 Run 解析並以 2 個空格縮排重新輸出。
複製格式化後的 JSON,如果輸入無效則查看錯誤訊息。
The JSON Formatter and Validator turns minified, escaped or messy JSON into a clean, indented structure you can actually read, and pinpoints syntax errors with their exact location so you can fix them fast.
It runs your input through a strict JSON parser. If parsing succeeds, the tool re-prints the data with a consistent 2-space indent, which means a clean format is also proof that your JSON is valid. If parsing fails, you get a precise error instead of a vague "something is wrong".
Developers reach for it constantly: inspecting an API response, sanity-checking a config file, cleaning up a webhook payload before saving it, or making a large blob diff-friendly before committing it to version control. Readable JSON makes structure, nesting and missing fields obvious at a glance.
Most "invalid JSON" errors come from a handful of causes: keys or strings wrapped in single quotes instead of double quotes, a trailing comma after the last item, comments (which standard JSON does not allow), unquoted keys copied from a JavaScript object, or smart quotes pasted in from a document. The error position tells you exactly where the parser gave up.
Because the whole thing runs in your browser, your JSON never leaves your device. That matters when the payload contains access tokens, customer records or anything you would not want to paste into a random website that quietly uploads it to a server.
Once formatted, copy the result with one click. If you need the opposite, the JSON Minifier strips all whitespace to produce the smallest possible payload for production.
常見問題
它會解析您的 JSON,檢查其是否有效,並以整潔的 2 空格縮排重新輸出,便於閱讀。無效的 JSON 則會回傳精確的錯誤訊息。
不會。你的 JSON 完全在瀏覽器中格式化,因此不會向伺服器傳送任何內容。不會被儲存、記錄或分享。
格式化工具遵循嚴格的 JSON 標準:鍵和字串需使用雙引號,不允許尾隨逗號和註解。錯誤訊息會顯示解析失敗的位置。
嵌入此工具
將此工具加入你自己的網站。複製下方的程式碼片段,它會自動保持最新。
<iframe src="https://monu.tools/embed/zh-Hant/json-formatter" width="100%" height="640" style="border:1px solid #e5e5e5;border-radius:12px;max-width:680px" loading="lazy" title="Monu Tools"></iframe>相關工具