bibclean
A linter and formatter for BibTeX files, as a command-line tool and pre-commit hooks.
bibclean rewrites a .bib file into a canonical style and reports what it cannot rewrite, so that a bibliography stays readable in review and builds without surprises with pybtex and sphinxcontrib-bibtex. Comments, @string macros, @preamble blocks and unknown entry types are preserved, and a file with a block that cannot be parsed is reported and never rewritten.
It started as a small cleaner for the bibliographies fed to Sphinx documentation builds, and reached version 1.0 in October 2026.