mangiucugna/json_repair
A python module to repair invalid JSON from LLMs
This tool helps developers clean up messy JSON data, especially when it comes from large language models (LLMs) that might make formatting mistakes. You feed it a JSON string that's not quite right, and it gives you back a perfectly valid, standard JSON string or object. It's for software engineers who integrate LLMs or other external services and need reliable data parsing.
4,585 stars. Used by 39 other packages. Actively maintained with 14 commits in the last 30 days. Available on PyPI.
Use this if you frequently receive malformed JSON strings from APIs, LLMs, or other sources and need a robust way to automatically correct common syntax errors so your applications can process the data.
Not ideal if your JSON errors are due to fundamental data structure issues or missing critical information, as this tool focuses on syntax repair rather than semantic correction or data imputation.
Stars
4,585
Forks
175
Language
Python
License
MIT
Category
Last pushed
Mar 07, 2026
Commits (30d)
14
Reverse dependents
39
Get this data via API
curl "https://pt-edge.onrender.com/api/v1/quality/llm-tools/mangiucugna/json_repair"
Open to everyone — 100 requests/day, no key needed. Get a free key for 1,000/day.
Compare
Related tools
antfu/shiki-stream
Streaming highlighting with Shiki. Useful for highlighting text streams like LLM outputs.
iw4p/partialjson
+1M Downloads! Repair invalid LLM JSON, commonly used to parse the output of LLMs — Parsing...
yokingma/fetch-sse
An easy API for making Event Source requests, with all the features of fetch(), Supports...
kaptinlin/jsonrepair
A high-performance Golang library for easily repairing invalid JSON documents. Designed to fix...
HAibiiin/json-repair
Repair JSON! A Java library for fixing JSON anomalies generated by LLMs.