JSON 修復

末尾カンマなどよくある誤りを自動修正

Broken JSON

Loading editor...

Repaired JSON

Loading editor...

Recover broken JSON instead of typing fixes by hand

AI tools and APIs don't always produce perfect JSON. Trailing commas, single quotes, comments, unquoted keys, half-truncated objects — every one of those will fail JSON.parse and stop your pipeline. A repair tool reads the broken input character by character and applies the minimum fixes needed to make it valid, preserving your data.

Use the repair tool when you need to

Fix malformed AI model output

Strip Markdown fences, repair single quotes, and close truncated objects so structured output becomes parseable.

Recover a half-broken API response

When a network blip cut a response mid-stream, repair closes open strings, arrays, and objects to salvage what arrived.

Clean up copied JSON from logs or chat

Logs often paste JSON with smart quotes, trailing commas, or extra wrapping — fix it instead of editing line by line.

How to repair JSON quickly

  1. 1

    Paste the broken JSON into the editor.

  2. 2

    Click Repair to apply the minimum fixes for valid syntax.

  3. 3

    Validate the repaired output, then copy or feed it into the next step in your pipeline.

Common repair workflows

Salvage AI tool-call output

Strip fences and trailing commentary from model output before passing it into a JSON parser.

Recover an interrupted API response

Close truncated objects and arrays to extract whatever data made it through the wire.

Clean up logged payloads

Repair JSON copied from log lines that lost or corrupted some characters in transit.

関連ツール

よくある質問

閉じ括弧/閉じ波括弧の不足、末尾カンマ、ダブルクォートの代わりのシングルクォート、クォートされていないプロパティ名、カンマ抜け、コメント(// と /* */)、途中で切れた JSON など、よくある JSON の崩れを修復します。壊れ方によっては、部分的に壊れた入力から有効な JSON を復元できることもあります。

一般的な JSON のミスを理解するパーサーで入力を 1 文字ずつ読み取り、構造上の問題を検出します。そのうえで、元データをできるだけ保ったまま有効な JSON にするための最小限の修正を適用します。

多くの場合は可能です。ネットワークタイムアウトなどで途中で途切れた JSON でも、開いたままの文字列・配列・オブジェクトを閉じて有効な JSON に整形できます。ただし、欠落した部分のデータは当然復元できません。

変更は「JSON として成立させるために必要な最小限」に留めます。値・キー・構造は可能な限り保持されます。また、適用した修正内容が一覧で表示されるため、何が変わったかを確認できます。