JSON
JSON Repair
壊れた JSON を修復 — 余分なカンマ、シングルクォート、クォートのないキー、コメント、Python リテラル(True/False/None)など — 適用したすべての修正内容を一覧表示。
Data that claims to be JSON often has small deviations from the spec: a trailing comma, single quotes, unquoted keys, Python literals like True/False/None instead of true/false/null. This tool fixes such issues automatically and lists every fix it applied.
How to use it
- Paste broken JSON and the tool immediately tries to fix syntax issues and shows the valid result.
- The list below shows each applied fix separately, so you can check exactly what changed.
- If it can't be repaired (the structure is too damaged), the tool points to the exact line where parsing stopped.
Common uses
- Fixing JSON copied from logs or a console, where strings may have been truncated or escaped incorrectly.
- Converting a Python-style dict (with True/False/None and single quotes) into valid JSON.
- Parsing an LLM response that promised JSON but added a comment or a stray comma.
Things to keep in mind
The tool only fixes syntax errors — it won't catch a broken data structure (a missing field, swapped values), since that kind of JSON is still syntactically valid.
If the damage is severe enough (a string cut off mid-way, for example), the automatic fix can produce an unexpected result — always check the output before using it.
よくある質問
このツールはどのような問題を修復できますか?
トレイリングカンマ、ダブルクォートの代わりのシングルクォート、クォートされていないキー、コメント、Pythonの真偽値・null(True/False/None)をtrue/false/nullに変換、カンマやコロンの欠落、閉じられていない文字列・オブジェクト・配列などを修復し、適用した修正内容を一覧表示します。
どんなJSONでも必ず修復できますか?
必ずしもできません。データが本質的に曖昧であったり、入力が大きく欠落している場合(たとえば大幅に切り詰められた入力)は、一意に正しいと言える修復方法が存在しないことがあります。
修復対象のJSONはサーバーにアップロードされますか?
されません。修復処理はすべてブラウザ内のJavaScriptで行われます。
修復結果が正しくないように見える場合はどうすればよいですか?
特に途切れた箇所については、必ず結果を手動で確認してください。自動修復は「もっとも破壊的でない」推測を行います(例えば単に開いている括弧を閉じるだけ)が、データが深刻に破損している場合、どんな値が意図されていたかを言い当てることはできません。
データ内の論理的な誤りも修復してくれますか?
いいえ、修復するのは構文のみです。フィールドがまるごと欠落していたり、値の位置が入れ替わっていたりしても(JSON自体は構文的に正しい場合)、このツールはそれを検出しません — これは構文エラーではないためです。