Debug API 回應
從 backend log 或 DevTools 複製被壓縮的 response body,貼進來,立即看到結構。不用裝 CLI 工具或設 jq alias。
一鍵格式化、壓縮、驗證與樹狀檢視 JSON 資料。全部在瀏覽器端處理,你的資料不會離開本機。
不會。所有解析與格式化都是在你的瀏覽器內執行的,資料不會離開本機。
大多數現代瀏覽器可以順暢處理 1-10 MB 的 JSON。超大檔案 (>20 MB) 可能會比較慢或卡頓,建議用命令列工具處理。
快速、隱私、零安裝 — 直接在瀏覽器解析你的 JSON。
一鍵將壓縮的 JSON 展開成易讀格式,支援縮排與自動語法高亮。
移除全部空白與換行,產出最精簡的 JSON,方便 API 傳輸。
解析失敗時會標示第幾行第幾欄,並顯示錯誤上下文,方便除錯。
可展開/收合的結構化檢視,一眼看懂巢狀結構,顯示陣列長度與鍵數。
全部在你的瀏覽器計算,資料不上傳到任何伺服器。
支援拖曳.json 檔上傳,也能把處理結果一鍵下載成.json。
純瀏覽器端 JSON 解析 — 不上傳、無 log、不打第三方 API。
把 JSON 字串貼進編輯器或拖入 .json 檔。瀏覽器用 FileReader 直接讀進 JavaScript 記憶體 — 沒有 XHR、沒有 fetch、沒有上傳。即使是好幾 MB 的 payload 也沒問題,parser 必要時會分塊處理。
我們把字串交給 JSON.parse — 跟你瀏覽器處理每個 fetch response 用的 V8 / SpiderMonkey / JavaScriptCore parser 一模一樣。如果解析失敗,會直接告訴你壞掉的字元在第幾行第幾欄,讓你立刻修正。沒有 regex hack、沒有曖昧的錯誤訊息。
解析完後,結果會用虛擬化 DOM 節點以可摺疊的樹狀呈現 — 即使 100,000 個 key 的物件仍能順暢維持 60 fps。可摺疊陣列、複製路徑、用鍵盤導覽。
選 2 / 4 / tab 縮排 pretty-print,壓縮成單行,複製到剪貼簿,或下載清理過的檔案。所有轉換都在瀏覽器中執行 — 結果 bytes 不會離開頁面。
純瀏覽器解析 JSON 勝出的真實場景。
從 backend log 或 DevTools 複製被壓縮的 response body,貼進來,立即看到結構。不用裝 CLI 工具或設 jq alias。
JWT 中段 Base64 解碼後的 JSON 貼進來,立即看到 claims、過期時間、自訂欄位。Token 不會碰到任何發行它的伺服器以外的地方。
把 CI 一直爆的格式爛掉的 .json 設定檔(Tailwind、ESLint、package.json、tsconfig)重新格式化。多餘逗號、重複 key 都會被抓出來。
開兩個瀏覽器分頁並排,貼新舊 schema。用樹狀視圖直接看出新增 / 刪除的欄位,不用 diff 一堆跳脫字串。
你解析的 JSON 通常含真實客戶資料、API key、JWT secret、內部 ID、PII。多數線上 JSON 格式化工具會把你貼的 payload POST 到他們的伺服器 — 等於每一筆都被第三方 log。iKit JSON Decoder 是這個分頁裡的 JavaScript,parser 看得到你的資料,伺服器看不到。
來自 iKit 部落格的深入教學與工具比較。
Pretty-print, validate, and structurally diff messy JSON with three methods that work in any browser.
When a JSON document needs to embed binary data inline, Base64 is the encoding that makes it possible.
在上方貼上你的 JSON——驗證器會精確定位到具體的行與字元位置。以下是開發者最常遇到的錯誤。
| Error message | Cause | Fix |
|---|---|---|
Unexpected token } in JSON at position N |
A trailing comma before } or ] — JSON does not allow trailing commas. | Delete the comma after the last item: {"a": 1,} → {"a": 1} |
Unexpected token ' in JSON at position N |
Single quotes around keys or values — JSON requires double quotes. | Replace 'value' with "value" on every key and string. |
Unexpected token N in JSON at position N |
A bare word like NaN, None or undefined — none are valid JSON values. | Use null, a number, or a quoted string instead. |
Expected property name or '}' / Expecting 'STRING' |
An unquoted object key: {name: "x"} — keys must be double-quoted strings. | Quote the key: {"name": "x"} |
Unexpected end of JSON input |
The text was truncated — an unclosed brace, bracket or string. | Check that every { has a } and every [ has a ] — the tree view shows where it stops. |
Unexpected token / in JSON at position N |
Comments (// or /* */) — the JSON spec does not allow them. | Remove the comments, or keep config in JSONC/YAML and convert before parsing. |
Bad control character in string literal |
A raw newline or tab inside a string. | Escape it: use \n, \t or \u escapes inside the quotes. |
JSON 允許的一切——以及那些眾所周知的禁忌(註解、尾隨逗號、單引號)。
| Type | Example | Notes |
|---|---|---|
| string | "hello" | Double quotes only |
| number | 3.14, -2, 1e9 | No NaN, Infinity or leading zeros |
| boolean | true, false | Lowercase only |
| null | null | Not None or nil |
| object | {"key": "value"} | Keys must be quoted strings |
| array | [1, "a", null] | Mixed types allowed |
| Escape | Meaning |
|---|---|
\" \\ \/ | Quote, backslash, slash |
\n \r \t | Newline, return, tab |
\b \f | Backspace, form feed |
\uXXXX | Unicode code point (4 hex digits) |
| Not allowed: comments, trailing commas, single quotes, unquoted keys | |
不會。所有解析與格式化都是在你的瀏覽器內執行的,資料不會離開本機。
大多數現代瀏覽器可以順暢處理 1-10 MB 的 JSON。超大檔案 (>20 MB) 可能會比較慢或卡頓,建議用命令列工具處理。
通常表示 JSON 有缺少引號、多餘逗號、或使用了單引號。切到「錯誤訊息」分頁可以看到確切的行列位置。
目前只支援嚴格 RFC 8259 的 JSON。如有需要支援 JSON5 / JSONC 請告訴我們。
第一次載入後,大部分資源會被瀏覽器快取;之後在有網路或沒網路的情況下都可以使用。
不可以——JSON 規範(RFC 8259)不允許註解,解析器會以語法錯誤拒絕它們。如果你需要帶註解的設定檔,可以考慮 JSONC 或 YAML,然後在解析前轉換為純 JSON。
是的。鍵與字串值區分大小寫("Name" 和 "name" 是不同的鍵),而且字面值 true、false 和 null 必須是小寫——True 或 NULL 是語法錯誤。
JSON 恰好有六種型別: string(僅限雙引號)、number(不允許 NaN 或 Infinity)、boolean(true/false)、null、object 和 array。其他任何東西——日期、undefined、函式——都必須用這些型別之一來表示,通常是 string。
格式化工具重新縮排 JSON 使其易讀(美化),或移除空白(壓縮)。驗證工具根據 JSON 文法檢查並回報出錯位置。本工具兩者兼備: 在你輸入時即時驗證,並顯示第一個錯誤的精確行號與字元位置。
可以——使用其他 iKit 工具: JSON ↔ YAML 轉換器在 jsonyaml.ikit.app,CSV ↔ JSON 在 csvjson.ikit.app。要比較兩個 JSON 檔案請使用 Diff Checker,要壓縮 JS/CSS 請使用 Minifier——它們和本工具一樣,全部免費且僅在瀏覽器中執行。