JSON Repair Tool and Invalid JSON Recovery Assistant

壊れた JSON 入力

1

修復済み JSON 出力

設定

JSON 修復の仕組み

無効な JSON を入力すると、システムは次の方法を順に試します:

1
JSONRepair ライブラリ
多くの一般的な問題を高速かつ正確に修復
2
基本パターン修正
単純な構文エラーに対応
3
AI プロバイダー
複雑なケース向けに AI などを使用

JSON の修復を開始

壊れた JSON を入力するか、Import でファイルから読み込みます。

手順ガイド: 壊れた JSON を修復する方法

1手順 1 – 壊れた JSON を貼り付ける2手順 2 – 自動修復プロセス3手順 3 – 修復結果を確認する4手順 4 – クリーンな JSON を使う

Repair JSON works best between validation and formatting. Start with the raw broken payload, let the tool try deterministic local repair first, use AI-assisted repair only if needed, then move the recovered JSON into validation, formatting, or export.

Recover broken text into usable JSON

Repair JSON is most valuable when the payload is too broken to use anywhere else

A lot of broken JSON is not just ugly - it is completely unusable. The repair step matters because it gets that payload back into a valid JSON shape so validation, formatting, comparison, and export are possible again.

Broken input
1
{
2
name: "Project X",
3
'id': 1024,
4
items: [
5
"A",
6
"B",
7
]
8
}
Repaired output
1
{
2
"name": "Project X",
3
"id": 1024,
4
"items": [
5
"A",
6
"B"
7
]
8
}

If the JSON is too broken to parse at all, starting with Repair JSON is often faster than starting with manual validation.

3 repair examples that reflect real workflows

Repair JSON is usually used for messy real-world payloads, not classroom examples. These examples match common issues in legacy systems, config cleanup, and corrupted logs.

Legacy API

Fix missing quotes and mixed quoting styles quickly

Useful for old systems, script-generated payloads, or manually assembled responses that almost look like JSON but are not actually valid.

壊れた JSON
1
{
2
orderId: 'SO-1024',
3
customer: {
4
name: 'Maeve'
5
}
6
}
修復済み JSON
1
{
2
"orderId": "SO-1024",
3
"customer": {
4
"name": "Maeve"
5
}
6
}

This category is usually fixed by local repair alone, without needing AI.

Config Cleanup

Strip comments and trailing commas so config parses again

Teams often write JavaScript object style config and only realize later that strict JSON does not allow comments or trailing commas.

壊れた JSON
1
{
2
"env": "prod",
3
"retry": 3, // retry count
4
"features": {
5
"betaCheckout": false,
6
}
7
}
修復済み JSON
1
{
2
"env": "prod",
3
"retry": 3,
4
"features": {
5
"betaCheckout": false
6
}
7
}

Repair JSON is ideal for pulling almost-JSON config back into a strict JSON form.

Complex Logs

Use AI only when deterministic repair is not enough

When a payload includes truncation, escape damage, and multiple bracket errors at once, deterministic local rules may not be enough. That is where AI repair becomes useful.

壊れた JSON
1
{"event":"checkout","user":{"id":42,"name":"Maeve"},"items":[{"sku":"A-1","qty":2},{"sku":"B-8","qty":1],"status":"paid"
修復済み JSON
1
{
2
"event": "checkout",
3
"user": {
4
"id": 42,
5
"name": "Maeve"
6
},
7
"items": [
8
{
9
"sku": "A-1",
10
"qty": 2
11
},
12
{
13
"sku": "B-8",
14
"qty": 1
15
}
16
],
17
"status": "paid"
18
}

After this kind of repair, validate the result again before trusting it in downstream workflows.

  1. 01

    Tutorial Step

    手順 1 – 壊れた JSON を貼り付ける

    The repair tool needs the original context more than a half-cleaned version. Logs, old API responses, and broken config files are often easier to repair when you keep the raw text intact instead of manually deleting large sections first.

    • 無効または壊れた JSON(ログ、古い API、設定ファイルなど)をコピーします。
    • 左側のエディターに貼り付けます。ファイルのドラッグ&ドロップや Import ボタンも利用できます。
    • キーの引用符不足や末尾カンマなどのエラーは気にしないでください。ツールが修復します。
    • If the validator already showed a long list of syntax failures, switching here usually saves more time than fixing them one by one.
    • Keeping the raw payload intact gives both local repair and AI repair a better shot at reconstructing the intended structure.
  2. 02

    Tutorial Step

    手順 2 – 自動修復プロセス

    Not every repair uses AI. Most broken JSON is fixed by deterministic local rules, so the real goal here is to understand the repair order instead of assuming every issue needs an AI rewrite.

    • JSON が無効な場合、「修復」ボタンが表示されます(手動で押すことも可能です)。
    • まず高速なローカル修復で構文エラーを即座に修正します。
    • ローカル修復で足りない場合、意図を推定して構造を直すために AI 修復へ移行します。
    • The progress indicator helps you see whether the page is doing local repair, AI repair, or final validation of the repaired result.
    • If the input is too large for AI repair, split it into smaller logical chunks instead of retrying the same oversized payload.
  3. 03

    Tutorial Step

    手順 3 – 修復結果を確認する

    A successful repair is not only about making the JSON parse again. You also need to confirm that the result still matches the intended business structure, especially for nested objects, arrays, and partially corrupted logs.

    • 右側に修復済みの有効な JSON が表示されます。
    • 検証しやすいよう自動的に整形(pretty‑print)します。
    • 有効ステータスを確認し、標準 JSON 構文に準拠していることを確かめてください。
    • If the repaired result still looks suspicious, return to the validator or original source instead of pushing it downstream blindly.
    • For logs and configuration, pay special attention to booleans, numbers-as-strings, and datetime fields after repair.
  4. 04

    Tutorial Step

    手順 4 – クリーンな JSON を使う

    Repair is the recovery step, not the final destination. Once the JSON is usable again, you should immediately move it into the right next tool depending on whether you need validation, readability, schema generation, or field-level review.

    • Copy を押して修復済み JSON をクリップボードにコピーします。
    • バックアップ用に `.json` ファイルとしてダウンロードできます。
    • さらに手動編集したい場合は Apply で入力側へ戻します。
    • If you need row-and-column review, filtering, or bulk edits, continue into the table editor.
    • If the repaired JSON is now stable, it is also a much better input for schema generation, type generation, and transformation steps.

A more reliable repair workflow

1

Paste the raw broken JSON into Repair JSON before doing broad manual cleanup.

2

Let local repair run first and use that result when it is enough, rather than forcing every case through AI.

3

If the structure is still too broken, split the payload or let AI repair handle the more complex reconstruction.

4

Validate the repaired output next, then move it to the formatter, table editor, or schema tools depending on your goal.

5

If the result matters for team review or rollback, download the repaired version instead of only copying it to the clipboard.

Repair JSON is most useful not because it saves one comma fix, but because it recovers data that would otherwise be blocked from the rest of your JSON workflow.

Practical repair tips

If the payload only has a few syntax problems, repair is fast. If large sections are missing, repair can recover syntax but not invent the original business data.
For very large payloads, split the JSON into logical chunks before repair. Success rates are usually better that way.
Do not ship or store the repaired result blindly. Validate it first, then decide whether it also needs formatting.
If you need to inspect fields one by one after repair, the table editor is often easier than scanning a long JSON blob.

関連する JSON ツール

  • 修復後は、整形・検証・変換なども行うと便利です。

よくある質問

JSON 修復はどのように動作しますか?

修復システムは多層アプローチです。まず JSONRepair ライブラリで高速かつ確実に修正し、次に基本的なパターン修正を行い、それでも難しい場合は AI プロバイダー(AI、OpenRouter、Groq)で複雑な問題に対応します。

データは安全ですか?

はい。ローカル修復(JSONRepair とパターン修正)はすべてブラウザー内で完結し、データを保存しません。複雑なケースで AI 修復を使用する場合、JSON は処理のために AI プロバイダー(AI)へ送信されますが、保存や学習には使用されません。

どの修復方法を使用しますか?

1) JSONRepair — 多くの一般的な問題を高速かつ正確に修復。2) 基本修復 — 単純な構文エラーに対するパターン修正。3) AI 修復 — 複雑な構造問題に対して AI などの AI プロバイダーを使用します。

引用符やカンマの欠落は修復できますか?

はい。キーの引用符不足、末尾の余分なカンマ、要素間のカンマ欠落、括弧の不一致などの一般的なエラーはローカル修復エンジンで自動的に修正されます。

AI 修復にサイズ制限はありますか?

はい。安定性のため、AI 修復は 1 リクエストあたり約(~18000 文字)までを想定しています。より大きい JSON はローカル(JSONRepair/基本修復)で直すか、AI 修復前に小さく分割してください。

API キーは必要ですか?

いいえ。API キーは不要です。複雑なケースでは、ローカル修復と内蔵修正に加えて(当社が管理する)AI API 連携で結果を強化します。設定なしで利用できます。

修復の精度はどのくらいですか?

一般的な問題に対しては JSONRepair が高い精度を発揮します。基本パターン修正は単純な構文エラーに対応し、必要に応じて AI プロバイダーが複雑な構造問題を解析して修正します。

When should I stop auto-repairing and fix the JSON by hand?

If large sections of the payload are missing, truncated, or business meaning depends on context only you know, automatic repair can only recover syntax, not your original intent. In that case, combine validator diagnostics with manual fixes.