BibTeX Cleaner & Validator

Fix encoding, remove duplicates, and validate BibTeX .bib files

Detects duplicate cite keys, unbalanced braces, and missing required fields per entry type, and flags non-ASCII characters. Reports each issue with the offending key and outputs a deduplicated, normalised .bib — all client-side. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

What counts as a missing required field?

Each BibTeX entry type has required fields per the standard — for example @article needs author, title, journal, and year; @book needs author or editor, title, publisher, and year. Any required field that is empty or absent is flagged with the entry's cite key.

Clean and validate your BibTeX file

A broken .bib file is one of the most common causes of a failed LaTeX build: a duplicate cite key, a missing closing brace, or a missing required field can stop the bibliography from compiling. This tool scans your BibTeX, reports every problem it finds with the relevant cite key, and produces a cleaned, deduplicated version.

How it works

The validator parses entries with a brace-aware scanner, so nested {} inside a field value do not confuse it. For each entry it checks four things:

  • Duplicate keys — any cite key used more than once is reported; the cleaned output keeps only the first entry with that key.
  • Brace balance — opening and closing braces are counted per entry and across the file; a mismatch is flagged.
  • Required fields — the entry type is checked against the standard required-field list (article: author, title, journal, year; book: author/editor, title, publisher, year; inproceedings: author, title, booktitle, year; and so on).
  • Non-ASCII characters — raw characters above code point 127 are flagged because classic BibTeX may not render them correctly.

Notes

The cleaned output trims trailing whitespace, collapses runs of blank lines, and removes duplicate-keyed entries, but it does not rewrite your field values — so it is safe to diff against your original. Required-field warnings are advisory: an entry with a warning still appears in the cleaned output.

The most common causes of broken BibTeX files

Duplicate keys from export tools. When you export references from different databases — Google Scholar, Zotero, Mendeley, Scopus — and merge the files manually, it is easy to end up with duplicate cite keys. Zotero auto-generates keys like smith2023, and if you have two Smith 2023 papers, you get two entries with the same key. LaTeX silently uses the first match, so your citation to the second paper is silently wrong. This tool catches every duplicate.

Missing braces around capitalised words. BibTeX’s title-casing behaviour strips capital letters from titles when rendering with most styles. If your title contains acronyms or proper nouns like Applying BERT to Legal Documents, the BERT and Legal may be downcased to bert and legal in the output. The solution is to wrap capitals in extra braces: {BERT} and {Legal}. This tool flags non-ASCII and balance issues but does not auto-protect caps — that is a deliberate choice, because it requires human judgement about which capitals to preserve.

Raw Unicode from copy-paste. When you paste an entry copied from a PDF or web page, accented characters like é, ü, or ñ are often pasted in as raw Unicode. Classic BibTeX with pdflatex may render these correctly if you have the right input encoding declared, but bibtex-only pipelines often mangle them. Wrapping in LaTeX commands ({\'e}, {\"u}, {\~n}) is the safest cross-engine approach.

Required fields by entry type

Entry typeRequired fields
@articleauthor, title, journal, year
@bookauthor or editor, title, publisher, year
@inproceedingsauthor, title, booktitle, year
@incollectionauthor, title, booktitle, publisher, year
@phdthesisauthor, title, school, year
@mastersthesisauthor, title, school, year
@techreportauthor, title, institution, year
@miscauthor or title (at least one)

The tool checks each entry type against this list and reports which required fields are absent, named by cite key, so you can locate and fix them quickly.