Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Repair malformed JSON from LLMs, APIs, logs, and user input in Python.
| Date | Stars |
|---|---|
| 2026-07-24 | 5044 |
| 2026-07-25 | 5045 |
| 2026-07-28 | 5045 |
| 2026-07-30 | 5045 |
| 2026-07-31 | 5053 |
| 2026-08-08 | 5065 |
| 2026-08-17 | 5070 |
| 2026-08-18 | 5070 |
| 2026-08-19 | 5071 |
| 2026-08-20 | 5071 |
| 2026-08-21 | 5073 |
| 2026-08-23 | 5075 |
| 2026-08-24 | 5076 |
| 2026-08-25 | 5077 |
| 2026-08-26 | 5076 |
| 2026-08-27 | 5079 |
| 2026-08-28 | 5080 |
| 2026-08-31 | 5082 |
| 2026-09-01 | 5085 |
| 2026-09-02 | 5087 |
| 2026-09-03 | 5092 |
| 2026-09-05 | 5091 |
| 2026-09-06 | 5092 |
| 2026-09-07 | 5093 |
| 2026-09-09 | 5093 |
| 2026-09-10 | 5094 |
| 2026-09-11 | 5094 |
| 2026-09-12 | 5095 |
| 2026-09-13 | 5096 |
| 2026-09-14 | 5097 |
| 2026-09-15 | 5096 |
| 2026-09-16 | 5099 |
| 2026-09-20 | 5102 |
Today
+3 stars today
This week
+6 stars this week
This month
+29 stars this month
Momentum
53.0
growth rate 0.12%/day
[](https://pypi.org/project/json-repair/)

[](https://pypi.org/project/json-repair/)
[](https://pepy.tech/projects/json-repair)
[](https://github.com/sponsors/mangiucugna)
[](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/).

---
## Quick example
```python
import json_repair
bad_json = '{"users":[{"name":"Ada","role":"admin",}],"ok":true'
decoded_object = json_repair.loads(bad_json)
# {'users': [{'name': 'Ada', 'role': 'admin'}], 'ok': True}
```
If `json_repair` saves you time, [star the repository](https://github.com/mangiucugna/json_repair) so more people can find it.
---
# Demo
If you are unsure whether this library will fix your specific problem, or simply want your JSON validated online, try one of these:
- Live demo: https://mangiucugna.github.io/json_repair/
- Audio overview: [NotebookLM introduction](https://notebooklm.google.com/notebook/05312bb3-f6f3-4e49-a99b-bd51db64520b/audio)
## Premium sponsors
- [Icana-AI](https://github.com/Icana-AI) Makers of CallCoach, the world's best Call Centre AI Coach. Visit [https://www.icana.ai/](https://www.icana.ai/)
- [mjharte](https://github.com/mjharte)
---
# Think about sponsoring this library!
This library is free for everyone and is maintained as a side project, so if it helps your work, consider becoming a sponsor: https://github.com/sponsors/mangiucugna
---
# Motivation
Some LLMs are a bit iffy when it comes to returning well formed JSON data, sometimes they skip a parentheses and sometimes they add some words in it, because that's what an LLM does.
Luckily, the mistakes LLMs make are simple enough to be fixed without destroying the content.
I searched for a lightweight python package that was able to reliably fix this problem but couldn't find any.
*So I wrote one*
# Supported use cases
### Fixing Syntax Errors in JSON
- Missing quotes, misplaced commas, unescaped characters, and incomplete key-value pairs.
- Missing quotation marks, improperly formatted values (true, false, null), and repairs corrupted key-value structures.
- Python-style tuples: comma-separated parenthesized sequences become JSON arrays, while a single parenthesized value remains a scalar. Within arrays, objects, and tuples, `true`/`false`/`null` and `None` are recognized case-insensitively as JSON booleans or null.
### Repairing Malformed JSON Arrays and Objects
- Incomplete or broken arrays/objects by adding necessary elements (e.g., commas, brackets) or default values (null, "").
- The library can process JSON that includes extra non-JSON characters like comments or improperly placed characters, cleaning them up while maintaining valid structure.
### Auto-Completion for Missing JSON Values
- Automatically completes missing values in JSON fields with reasonable defaults (like empty strings or null), ensuring validity.
# How to use
Install the library with pip
pip install json-repair
then you can use use it in your code like this
from json_repair import repair_json
good_json_string = repair_json(bad_json_string)
# If the string was suExcerpt of 19,514 characters
Read on GitHub571
3
2
2
Paul Baranowski · Instacart · United States
2
2
kba977 · China
2
2
Andrew Smirnov
2
Ikko Eltociear Ashimine · Japan
1
1
YeuolyWorks
1
1
Ben Mezger · @RoyalAholdDelhaize
1
Benjamin Gruenbaum · @eon-io · Israel
1
Matthieu Sarter · Self employed · France
1
1
1
1
Would you bet a product on this? Bounded 0–100 and slow moving.
matched fp:4b174f077bc3aa90, topic:structured-output, topic:json-schema, readme:schema-guided
matched fp:4b174f077bc3aa90, topic:llm