JSON 修復

修復尾隨逗號、單引號、註釋和其他常見 JSON 問題。

免費線上 JSON 修復工具

AI 模型中的無效 JSON、複製貼上的 JavaScript 或手動編輯的配置令人沮喪。 Dokall 的 JSON 修復工具會自動修復常見語法問題並傳回有效的、列印精美的 JSON。

貼上損壞的 JSON,點擊“修復”,然後複製結果。該工具列出了修復的內容 - 刪除了尾隨逗號、標準化引號、閉合括號等等。所有處理都在您的瀏覽器中運作。

Frequently Asked Questions

What JSON errors can this tool fix?
Common fixes include trailing commas, single-quoted strings, unquoted keys, JavaScript-style comments, markdown code fences around JSON, and truncated output from LLMs. The tool lists every fix it applied so you can review the changes.
Can it fix JSON from ChatGPT or other AI models?
Yes. LLM output frequently includes trailing commas, markdown wrappers (```json), and comments - all invalid in strict JSON. Paste the raw output and Dokall repairs it into valid, pretty-printed JSON.
Is repaired JSON always correct?
The tool fixes syntax errors, not semantic errors. A repaired file is valid JSON, but the data might still be wrong - missing fields, incorrect types, or truncated values. Always review the output, especially for AI-generated content.
What is the difference between JSON repair and JSON format?
The JSON formatter validates and pretty-prints already-valid JSON. JSON repair fixes broken syntax first, then formats. Use repair when JSON.parse() throws an error; use the formatter when your JSON is valid but minified or hard to read.
Is my data sent to a server?
No. Repair runs entirely in your browser. Your JSON - including API keys, user data, and configs - never leaves your device.