Skip to main content
Calctrove Calctrove

JSON Repair

JSON Repair

Best-effort repair for malformed JSON with selectable strategy, diff preview, and confidence report.

Primary result

Repaired successfully

Auto-update is active.

More actions
Input: manual
Copy full input/output report

Conversion settings

Settings changes apply automatically.

Workspace status

Ready • 72 chars

Self-check score (heuristic): 88/100 • Good confidence

Performance: 1 ms transform • live debounce 320 ms.

Clear empties current input/output. Reset restores built-in defaults and settings.

Repair confidence report

Low confidence: significant or risky modifications detected; manual verification is required.

Strategy: balanced
LOW confidence
Score: 45/100
  • Applied 3 repair rule(s).
  • Large line-level drift detected between original and repaired output.
Repair diff preview (7/8 lines changed)

Changed line ratio: 88%. Preview shows the first 6 changed lines.

  • Line 2

    - id: 42,

    + "id": 42,

  • Line 3

    - 'name': 'Ada',

    + "name": "Ada",

  • Line 4

    - "roles": ["dev", "admin",],

    + "roles": [

  • Line 5

    - }

    + "dev",

  • Line 6

    - (empty)

    + "admin"

  • Line 7

    - (empty)

    + ]

Flow
  • Select repair strategy (safe, balanced, aggressive).
  • Run strategy-specific normalization rules (quotes, keys, trailing commas, aggressive literal salvage).
  • Parse repaired output, then report warnings, diff preview, and confidence/safety signals.
Example

Worked example: trailing comma and unquoted key

  1. 1 Input: {id:42,}
  2. 2 Repair quotes key and removes trailing comma
  3. 3 Repaired output: {"id":42}

The repaired payload becomes valid JSON.

How
  1. Paste broken JSON into the input area.
  2. Choose repair strategy based on risk tolerance and run repair.
  3. Review repaired output, action log, confidence report, and diff preview.
  4. Copy repaired JSON and verify with JSON Validator when needed.
Avoid
  • Expecting perfect repair for severely ambiguous inputs.
  • Assuming semantic data issues can be auto-corrected.
  • Skipping manual review after automated repair.
FAQ
Can this repair every invalid JSON string?

No tool can guarantee full repair for every malformed case, so review output before production use.

Does it remove comments?

Yes, comment stripping is part of the repair flow.

What is the difference between strategies?

Safe mode applies minimal edits, balanced mode handles common malformed syntax, and aggressive mode salvages additional ambiguous literals.

Does it report what was auto-fixed?

Yes, the tool lists repair actions, line-level diff preview, and confidence/safety flags.

Is repaired JSON guaranteed semantically correct?

It is syntactically validated, but semantic intent still requires human review, especially in aggressive mode.

Switch
Switch9