fix-busted-json
Fixes broken JSON string objects
What it is and what it does
fix-busted-json is a Python utility that takes JSON strings with common syntax violations and returns valid JSON. It handles unquoted keys, incorrect quote styles (single quotes, backticks, curly quotes), missing commas, trailing commas, Python literals (True/False/None), string concatenation, and various escaping edge cases. The package also provides helper functions to locate and extract JSON objects embedded within plain text—a use case that emerged from processing large language model outputs, which often produce JSON-like structures with syntax errors.
The package has no runtime dependencies and supports Python 3.6 and later. It is designed as a lightweight, focused tool for a specific problem: when you have text containing JSON that is almost valid but has known categories of errors, fix-busted-json can normalize it into parseable form without requiring manual intervention or complex error handling.
Use it for:
- Extract and repair JSON output from large language model completions that contain syntax errors
- Parse JSON-like objects embedded in log files or unstructured text with quote and comma issues
- Normalize malformed JSON responses from APIs or third-party tools before processing
- Find and pretty-print all JSON objects within a larger text document, including nested objects
- Convert Python dict-like syntax (with True/False/None) into valid JSON for downstream processing
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Repairs malformed JSON strings by fixing common syntax errors like unquoted keys, wrong quote types, missing commas, and Python literal values, then optionally extracts JSON objects from surrounding text.
Yes, if you regularly encounter malformed JSON from LLMs or need to extract JSON from unstructured text. The package is lightweight, dependency-free, and handles a well-defined set of real-world syntax errors. The aging maintenance status is not a blocker for a focused utility with no external dependencies and no known vulnerabilities, but do not expect active development or rapid response to new issues.
Install
fix-busted-json on PyPI
pip
pip install fix-busted-jsonuv
uv add fix-busted-jsonpoetry
poetry add fix-busted-jsonInstalling fix-busted-json
Before you install
Low install friction with no runtime dependencies. Maintenance status is aging (208 days since last release), though the package was last released 2026-01-18.
License in practice
MIT license (permissive) allows free use, modification, and distribution with minimal restrictions.
Quickstart
pip install fix-busted-json
from fix_busted_json import repair_json
invalid_json = "{ name: 'John' 'age': 30, 'city': 'New' + ' York', }"
fixed_json = repair_json(invalid_json)
print(fixed_json)
Requires Python 3.6 or later.
Verify before relying
- Whether the repair heuristics handle all edge cases reliably or fail gracefully on deeply nested or unusual malformed JSON
- Performance characteristics on very large JSON strings or documents with many embedded objects
Package facts
| License | not declared (permissive) |
| Python support | supports the current Python release (>=3.6) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | aging — 208 days since the last release |
| First released | |
| Downloads | 100,668/month — #12,976 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: fix_busted_json-0.0.19-py3-none-any.whl
Tags
More Text Processing packages
A drop-in replacement for Python's standard…
permissive · top 100 on PyPI
pyparsingpyparsing provides a library for building text…
permissive · top 1,000 on PyPI
docutilsDocutils converts plaintext documentation in…
unclear · top 1,000 on PyPI
RapidFuzzRapidFuzz provides fast fuzzy string matching…
permissive · top 1,000 on PyPI
tinycss2tinycss2 parses CSS strings into token and…
permissive · top 1,000 on PyPI
llama-parseLlamaParse parses complex documents (PDFs,…
permissive · top 1,000 on PyPI
json-repairParses and repairs malformed JSON strings from…
permissive · top 1,000 on PyPI
jsonquerylangExecutes queries against JSON data using a…
permissive · top 15,000 on PyPI
json5kitParses JSON5 (JSON with comments, trailing…
permissive · top 15,000 on PyPI
partialjsonParses incomplete or malformed JSON strings…
permissive · top 15,000 on PyPI
chompjsParses JavaScript objects embedded in HTML or…
permissive · top 15,000 on PyPI
smartypantsConverts plain-text punctuation to…
permissive · top 15,000 on PyPI
json5Parses and writes JSON5 data format, which…
permissive · top 1,000 on PyPI
jsoncommentParses JSON with comments, multiline strings,…
permissive · top 15,000 on PyPI
jstylesonParses JSON strings that contain…
permissive · top 15,000 on PyPI
json-with-commentsParses and serializes JSON with support for…
permissive · top 15,000 on PyPI