English | 中文

Open source · Free · No signup

JSON Repair & Schema Validation — fix malformed JSON online

Paste broken JSON (even messy LLM output), optionally provide a JSON Schema, and instantly get valid, formatted output with a detailed log of every fix.

What the JSON Repair demo does

API is hosted on PythonAnywhere’s free tier; if you hit quota, try again later or run the package locally.

How to repair JSON online

  1. Paste malformed JSON (from webhooks, logs, or LLM responses) into the left box.
  2. Optionally paste a JSON Schema to validate/coerce fields (for example string-to-integer conversion).
  3. We validate, repair, and format automatically as you type.
  4. Copy the valid JSON on the right or review the “repair actions” log for debugging.

JSON Schema validation online

Use the optional JSON Schema input to validate repaired JSON against required properties, value types, and constraints before you copy results into production systems.

Why developers use json_repair

  • Handles common AI issues: hallucinated text in JSON, wrong booleans/null, broken arrays.
  • Drop-in replacement for json.loads() when you need resilient parsing.
  • Ideal for webhook payloads, schema-validated pipelines, and prompt engineering workflows.

Prefer code?

Install the package locally and bypass API limits.

pip install json-repair
python -m json_repair

Examples we fix: trailing commas, missing quotes, stray comments, invalid true/false/null, incomplete objects.

Optional. Provide a JSON Schema to guide coercions, defaults, and validation. Leave empty to use normal repair mode.

Schema is optional and included in the page URL so you can share reproducible examples.

FAQ: fixing JSON for production

Does this work for AI/LLM responses?

Yes. json_repair is tuned for messy model output: it removes prose, repairs syntax, and keeps structured data intact.

Can I validate against a JSON Schema here?

Yes. Paste a JSON Schema in the optional schema box to apply schema-guided validation and type coercion while repairing malformed JSON.

Can I trust the repaired JSON?

Every action is logged so you can review context before sending payloads to production systems.

What if I need offline or private processing?

Install the library locally (pip install json-repair) to repair sensitive JSON without hitting the public API.

How do I report issues or request features?

Open an issue on GitHub and include a sample payload; this page URL is a permalink you can reference.