JSON Repair & Syntax Fixer

Paste broken JSON and get valid JSON back. Fixes trailing commas, single quotes, unquoted keys, comments, markdown fences, truncated output, and missing commas without changing your data.

Private by architecture: All processing is 100% client-side memory. Your data never leaves this browser tab.
Auto-repairs on every keystroke: no button press needed.
Broken JSON Input
0 lines · 0 charsBroken JSON
Clean Repaired JSON
Ctrl/Cmd+Shift+C
0 charsValid JSON

About This Tool

JSON Repair takes text that is close to JSON but not quite (LLM responses, hand-edited configuration files, or copied JavaScript object literals) and turns it into syntactically valid JSON. It repairs automatically on every keystroke with zero button presses required.

Fixes syntax without modifying underlying semantics. It handles trailing commas, single quotes, unquoted dictionary keys, single-line and multi-line comments, markdown ```json fences, truncated objects from interrupted streaming, and missing commas between adjacent elements.

Key Features

  • Real-Time Auto-Repair: Instant background parsing fixes input continuously as you paste or type.
  • Trailing Commas & Single Quotes: Strips illegal trailing commas and converts single-quoted keys and values to valid double quotes.
  • Comment Stripping: Cleanly removes single-line // and block /* */ comments from configuration payloads.
  • Markdown Code Fence Removal: Detects and strips outer ```json markdown wrappers emitted by AI models.
  • Truncation Recovery: Infers missing closing brackets and braces based on nesting hierarchy.
  • 100% Client-Side Execution: All parsing and repair algorithms run in-browser with zero network calls.

Frequently Asked Questions

When should I not use auto-repair?
Repair makes educated guesses. For security-sensitive data (signed payloads, auth tokens, anything where exact byte values matter), always validate the repaired result against the expected shape. If the upstream source keeps producing broken JSON, fix the source directly.
What about JSON5?
JSON5 is a formal superset of JSON that allows trailing commas, unquoted keys, single quotes, and comments by design. If you control the configuration format, JSON5 is a cleaner fit than leaning on repair. If the JSON comes from an external source you don't control, repair is the right tool.
Does this send my data anywhere?
No. All repair logic runs entirely in your browser. Nothing is transmitted to a server.