Publication Utility

BibTeX Sanitizer

Paste raw exports from Google Scholar or reference managers. This utility strips bloated fields, enforces standard indentation, and protects title capitalization.

Strip Redundant Fields

Raw Input

Sanitized .bib
Processed syntax will appear here...
How-To Guide

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.

1

Paste your raw .bib

Drop in messy exports from Google Scholar, Zotero or Mendeley, or click Load example to see the tool in action.

2

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.

3

Review the live output

The sanitized .bib updates instantly on the right, with a running count of entries parsed and fields removed.

4

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.

A note on “Protect title casing”. This option wraps the whole title in double braces ({{…}}) 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?
No. All parsing and formatting happen in your browser. Nothing is sent anywhere.
Why did my titles gain an extra pair of braces?
The ‘Protect title casing’ rule wraps title and booktitle in {{…}} to stop the bibliography style from changing the capitalization. Turn it off if your style should control case, or brace only specific words manually.
Can it handle nested braces in a value?
Yes. The parser is brace-aware, so nested groups such as {A study of {NaCl}} are preserved rather than truncated.
What is the point of the en-dash fix?
In LaTeX, page ranges use an en-dash, written as two hyphens (100--110). The rule converts single hyphens between page numbers and is safe to run repeatedly.
Which fields should I strip?
Fields that do not affect typesetting (such as abstract, url, urldate, file and keywords) are common culprits for bloated .bib files. Keep anything your citation style actually prints.

Runs entirely in your browser, no data leaves your device.