styleLatex
All free tools

BibTeX Cleaner

Paste a .bib file or upload one and this BibTeX cleaner tidies it as you type. Duplicate entries are merged, titles keep their capitals, accents and page ranges are written the way BibTeX expects, and a report lists missing fields and keys to check.

Cleaned in your browser. Nothing is uploaded.

BibTeX

@article{vaswani2017,
  author  = {Vaswani, Ashish and Shazeer, Noam},
  title   = {Attention is All you Need in {NLP}},
  journal = {Advances in Neural Information Processing Systems},
  volume  = {30},
  pages   = {5998--6008},
  year    = {2017},
  month   = dec,
  doi     = {10.5555/3295222.3295349}
}

@inproceedings{muller2020,
  author = {M{\"u}ller, J{\"o}rg and {\O}ster, {\L}ukasz},
  title  = {Fast \& Robust {GPU-based} Sorting},
  year   = {2020}
}

Entries: 2 · Duplicates merged: 1 · Fields removed: 2

Merged duplicates. If your text cites a removed key, cite the kept one instead:

  • vaswani2017attention → vaswani2017

Check these entries:

  • muller2020: missing booktitle

References are clean, but the paper is still a PDF or a scan? Convert it to LaTeX.

Convert a file

How to clean a BibTeX file

Paste or upload the .bib file

Paste entries or upload the .bib file exported from Zotero, Mendeley, JabRef, Google Scholar or Overleaf. The BibTeX cleaner runs in your browser on every keystroke, so the cleaned file appears at once and your references never leave the page.

Choose what to change

Merging duplicates, accents as LaTeX, protected capitals and aligned = signs are on by default. Choose an order for the entries, and edit the list of fields to remove: abstracts, attached file paths and reference-manager notes are dropped unless you take them off the list.

Copy the result and read the report

Copy the file from the BibTeX cleaner or download it as references.bib and replace your old one. Below it, the report counts the entries, lists each merged duplicate with the key that replaced it, and flags entries with missing or repeated fields.

What the BibTeX cleaner changes

Duplicates and keys

Two entries are duplicates when they share a DOI, or the same title, year and first author, or the same key and title. The first copy stays and takes any field only the other one had, such as a volume. The BibTeX cleaner also reports a key used by two different entries, because BibTeX keeps only the first.

Fields and values

The BibTeX cleaner writes entry types and field names in lower case, fields follow one order (author, title, journal, year and so on), and every value is braced. 1-10 becomes 1--10, December becomes the dec macro, a DOI loses its https://doi.org/ prefix, and stray &, % and # are escaped. Empty fields and extra spaces are removed.

Titles and special characters

Most styles lower-case titles, turning DNA into dna. The BibTeX cleaner braces acronyms and words with inner capitals, such as {DNA}, {GPU-based} and {LaTeX}, and leaves text you already braced alone. Accented letters become LaTeX commands, so Müller becomes M{\"u}ller and Łukasz {\L}ukasz, which plain BibTeX prints correctly.

Checks and limits

Missing required fields

Each common entry type needs certain fields: an article needs author, title, journal and year; an inproceedings needs a booktitle; a thesis needs a school. The BibTeX cleaner names every entry that lacks one, so you can fill it in before BibTeX warns about it.

What stays as written

@string macros and @preamble stay at the top, and values built from macros or # are kept exactly. An entry the BibTeX cleaner cannot read, usually because of an unbalanced brace, is kept unchanged at the end and counted in the report. @comment blocks and loose text between entries are removed.

Entries without a DOI?

If an entry is incomplete or has no DOI, look it up and paste the fresh entry in: the DOI to BibTeX tool returns a full entry from the publisher's record.

DOI to BibTeX

Official references: BibTeX · biblatex (CTAN)

BibTeX Cleaner: styleLatex card with the tool's purpose and a code sample | BibTeX Cleaner

BibTeX cleanup questions

How to add DOI in BibTeX?
Add doi = {10.1000/xyz123} without the https://doi.org/ prefix; the BibTeX cleaner removes that prefix for you. For a link, add url = {https://…} and load the url or hyperref package. Classic styles such as plain ignore both fields, while plainnat and biblatex styles print them.
What is BibTeX format?
A .bib file is plain text: each entry starts with a type and a key, @article{key, followed by fields such as author = {…} and year = {2020}, separated by commas. LaTeX reads it through BibTeX or biber.
How to remove duplicate entry in BibTeX?
Paste the file into the BibTeX cleaner with Merge duplicates ticked. Entries with the same DOI, or the same title, year and first author, are merged into the first copy, and the report lists every removed key.
How to capitalize titles in BibTeX?
Styles change title case, so put braces around anything that must stay capitalized: {DNA}, {Bayesian}. The BibTeX cleaner does this for acronyms and words such as LaTeX automatically; brace other proper nouns yourself.
How to write special characters in BibTeX?
Write accents as LaTeX inside braces, such as {\"u} for ü, {\'e} for é and {\ss} for ß, and escape & as \&. With biber and biblatex you can keep UTF-8 instead; untick Accents as LaTeX to leave the letters as they are.
How to order references BibTeX?
The bibliography style decides the printed order: plain sorts by author, unsrt follows citation order. Sorting in this BibTeX cleaner only reorders the .bib file itself, which makes it easier to read and compare.
What is a BibTeX key?
The key is the name after @article{, such as vaswani2017. You cite it with \cite{vaswani2017}, so it must be unique in the file; the BibTeX cleaner flags keys that are used twice.
How to skip BibTeX errors?
It is better to fix them. The BibTeX cleaner shows entries that could not be read and entries missing required fields, the usual causes of BibTeX errors and warnings, so you can correct the source instead of ignoring the messages.
Is there a free BibTeX cleaner online?
Yes, this one. This BibTeX cleaner is free, needs no account and cleans files of up to 5 MB in your browser without uploading them.
How is this different from bibtex-tidy?
bibtex-tidy is an open-source formatter with many layout options. This BibTeX cleaner covers the common steps and adds a report: which duplicates were merged and which keys replace them, missing required fields, and entries it could not read.
How do I clean up a .bib file?
Paste or upload it into the BibTeX cleaner, keep the default options, copy the result over your old file and work through the report: replace removed keys in your text and fill in the missing fields it lists.
How should author names be written in BibTeX?
Write each name as Last, First and separate names with and, never with commas: author = {Vaswani, Ashish and Shazeer, Noam}. Put an organization in double braces, {{World Health Organization}}, and use and others for et al.
Will removing duplicates break my \cite commands?
Only if your text cites the removed key. The BibTeX cleaner lists each removed key with the one that replaced it, so search your .tex files for those keys, or untick Merge duplicates.
Which fields are removed, and can I keep them?
By default the BibTeX cleaner removes abstract, file, keywords, annote and the date and owner fields that reference managers add. The list is editable: take a field off to keep it, or clear the list to keep every field.

Have a whole page of notes, a scan or a PDF? Convert it to LaTeX that compiles.

Convert a file