Broken JSON Repair & Fixer
AI & LLM JSON HealerAutomatically fix broken, malformed, or truncated JSON from ChatGPT, Claude, and APIs.
Broken JSON Repair & Fixer Online - Heal Malformed AI & LLM JSON
Automatically fix and repair broken, malformed, or truncated JSON generated by ChatGPT, Claude, and local LLMs directly inside your browser.
Handles missing closing brackets and braces, removes trailing commas, converts Python True/False/None to valid JSON, quotes raw identifiers, and strips Markdown code blocks in real time.
Why Use PlayWithJSON?
- Auto-balances unclosed braces and brackets from truncated AI outputs
- Converts single quotes into compliant double quotes
- Removes invalid trailing commas from objects and arrays
- Normalizes Python True, False, and None into true, false, and null
- 100% private, client-side execution with zero server transmission
Key Features of Broken JSON Repair
Bracket & Brace Balancing
Automatically detects and closes unclosed curly braces and square brackets in the proper nested order.
Quote Normalization
Converts single-quoted keys and values into valid standard double quotes while preserving internal apostrophes.
Python Literal Coercion
Translates Python dictionary literals (True, False, None, NaN) into RFC-compliant JSON primitives.
Markdown Code Block Stripping
Strips markdown code fences (```json ... ```) automatically when copying responses from ChatGPT.
Comment & Comma Cleaning
Eliminates illegal trailing commas and strips single-line and multi-line comments.
Instant Copy & Export
Copy the healed, beautified JSON immediately or download it as a clean repaired.json file.
How to Fix Broken JSON Online
Paste Malformed JSON
Paste the broken or truncated JSON snippet into the left editor panel.
Automatic Repair
The healer instantly balances braces, quotes keys, removes trailing commas, and fixes literals.
Review Applied Fixes
Check the list of repaired issues shown in the status pill badge.
Copy or Download
Copy the valid, formatted JSON output to your clipboard or download the file.
Broken JSON Repair Example
Supported Repair Heuristics
Supported Repair Rules
Frequently Asked Questions about JSON Repair
More JSON Developer Tools
JSON Formatter
Format, validate and inspect JSON data
JSON5 Formatter
Format and validate JSON5 with comments
JSON ↔ JSON5
Convert between JSON and modern JSON5
JSON to TypeScript
Generate TypeScript interfaces from JSON
JSON to Zod
Generate Zod schemas from JSON
Text to JSON
Convert text and schemas into structured JSON
JSON Sorter Online
Sort JSON keys alphabetically and order arrays
JWT Decoder Online
Decode JWT header, payload and expiration
JSON Stringify Online
Escape quotes and stringify or unescape JSON
Mock JSON Generator
Generate realistic mock data for APIs and testing
JSON to CSV
Export structured JSON arrays into CSV spreadsheets
JSONPath Tester
Query and filter JSON data with path expressions
JSON Schema Generator
Generate JSON Schema from sample JSON
JSON Diff & Compare
Compare two JSON objects and find differences
JSON ↔ YAML
Convert JSON/JSON5 to YAML and back with comments
JSON ↔ XML
Convert JSON to XML and XML to JSON with attributes
YAML to CSV
Convert YAML lists and objects into spreadsheets
CSV to JSON / JSON5
Convert CSV/TSV to JSON or JSON5 with type parsing
JSON to BigQuery
Generate BigQuery Schema JSON and CREATE TABLE DDL
JSON to GraphQL
Generate GraphQL SDL types, queries, and inputs
JSON to MySQL
Generate MySQL CREATE TABLE DDL and INSERT queries
JSON to PostgreSQL
Generate PostgreSQL CREATE TABLE DDL, JSONB and INSERTs
JSON Flattener
Flatten nested JSON to dot notation or unflatten back
JSON Tree Visualizer
Interactive SVG mindmap graph and collapsible node tree
JSON Minifier Online
Compact and compress JSON by stripping whitespace
JSON Token Counter
Calculate LLM tokens (GPT-4o, Claude) and API costs
Broken JSON Repair
Automatically heal broken and truncated AI/LLM JSON