--- id: json-repair version: "0.63.1" license: MIT license_treatment: permissive maintenance: active --- # json-repair — A package to repair broken json strings License: permissive · Maintenance: active · Popularity: top 1,000 on PyPI ## Install pip install json-repair uv add json-repair poetry add json-repair ## Description [![PyPI](https://img.shields.io/pypi/v/json-repair)](https://pypi.org/project/json-repair/) ![Python version](https://img.shields.io/badge/python-3.10+-important) [![PyPI downloads](https://img.shields.io/pypi/dm/json-repair)](https://pypi.org/project/json-repair/) [![PyPI Downloads](https://static.pepy.tech/badge/json-repair)](https://pepy.tech/projects/json-repair) [![Github Sponsors](https://img.shields.io/github/sponsors/mangiucugna)](https://github.com/sponsors/mangiucugna) [![GitHub Repo stars](https://img.shields.io/github/stars/mangiucugna/json_repair?style=flat)](https://github.com/mangiucugna/json_repair/stargazers) English | [中文](https://github.com/mangiucugna/json_repair/blob/main/README.zh.md) # json_repair Repair malformed JSON from LLMs, APIs, logs, and user input in Python. - Fix missing quotes, commas, brackets, comments, stray prose, and truncated values. - Use it as a drop-in fallback for `json.loads()` or as a schema-guided repair step. - Install with `pip install json-repair` or try the [live demo](https://mangiucugna.github.io/json_repair/). ![banner](https://raw.githubusercontent.com/mangiucugna/json_repair/main/banner.png) --- ## Quick... ## AI interpretation — verify before relying Parses and repairs malformed JSON from LLMs, APIs, and user input by fixing missing quotes, commas, brackets, and other syntax errors, then returns valid JSON or Python objects. Verdict: A well-maintained, dependency-free utility for handling real-world malformed JSON—particularly useful when integrating LLM outputs. MIT-licensed, actively developed, and ranked in the top 1000 PyPI packages with no known vulnerabilities. Straightforward to adopt as a drop-in replacement for json.loads(). [View on SkillFed](https://skillfed.io/packages/json-repair) · [View on PyPI](https://pypi.org/project/json-repair/)