BibTeX Sanitizer
Paste raw exports from Google Scholar or reference managers. This utility strips bloated fields, enforces standard indentation, and protects title capitalization.
Raw Input
Processed syntax will appear here...
How to clean and standardize a .bib file
Reference managers export citations with tracking URLs, giant abstracts and inconsistent formatting. Here is how to sanitize them for a tidy LaTeX bibliography.
Paste your raw .bib
Drop in messy exports from Google Scholar, Zotero or Mendeley, or click Load example to see the tool in action.
Pick your rules
Toggle title-case protection, page-dash repair and equals-sign alignment, then tick any bloated fields (url, abstract, file…) you want stripped.
Review the live output
The sanitized .bib updates instantly on the right, with a running count of entries parsed and fields removed.
Copy or download
Use Copy All to grab the result, or Download to save a sanitized.bib file.
How the sanitizer works
What each rule does
Fix page dashes turns 100-110 into the LaTeX en-dash 100--110 (and leaves already-correct ranges untouched). Align equals pads keys so the = signs line up | purely cosmetic. Strip fields removes bulky, non-typesetting fields such as abstract, url and file.
Brace-aware parsing
The parser tracks brace depth, so a value like title = {A study of {NaCl}} is read correctly instead of being cut off at the first inner brace. @string, @preamble and @comment blocks pass through untouched. Everything runs locally in your browser.
{{…}}) so a bibliography style can’t re-case it. That guarantees your capitalization but also forces title-case, which many editors advise against. Best practice is usually to brace only the specific words that need it (acronyms, chemical formulae, proper nouns), e.g. title = {The {THE} operating system}. See the TeX FAQ link below.Frequently asked questions
Does the sanitizer upload my references?
Why did my titles gain an extra pair of braces?
Can it handle nested braces in a value?
What is the point of the en-dash fix?
Which fields should I strip?
Runs entirely in your browser, no data leaves your device.