Research Tools

BibTeX & BibLaTeX Cleaner, Validator and Formatter

Clean a .bib file without breaking it. Normalise indentation, field order, DOIs, months and page ranges; find duplicate keys and DOIs, empty, unknown and missing fields, bad URLs and syntax errors; review every change side by side and accept or reject it before downloading.
Runs in your browserNothing is uploadedEvery change is reviewable

Runs in your browser

This tool processes your input on your device. Files you select are not uploaded to MuhammadLab.

Example loaded.

Bibliography

Paste or type BibTeX, or drop a .bib file. Your text is checked as you edit.

Operations

Each operation is independent. Safe formatting is applied unless you untick it; anything else waits for you.

Indent fields, align the = signs and collapse runs of spaces. URL, DOI and file values are never touched.

Author, title, journal, year, … first; other fields keep their order at the end.

Strip https://doi.org/ and doi: from DOI fields.

Month macros (BibTeX) or numbers (BibLaTeX); 12-19 becomes 12--19.

Offer to remove fields such as note = {}.

Offer to remove the fields listed below, and URLs that only repeat the DOI.

Report keys used more than once. Keys are never renamed.

Report entries that share a DOI. Nothing is deleted.

Report repeated fields and names outside BibTeX and BibLaTeX.

Report missing required fields and broken crossref, xref and xdata targets.

Report URLs with spaces, no scheme or an invalid form.

Second opinion from the Citation.js BibTeX parser (first 400 entries). It only reports.

Comma-separated field names offered for removal. Removal always needs your approval.

Entries

9

Changes applied

21 / 25

Lines changed

48

Needs review

12

Syntax errors

1

Informational

4

Diagnostics

  • Syntax error

    Malformed entries · line 83

    @article{broken2020} starting on line 83 is never closed (unbalanced braces). The entry is left unchanged.

  • Needs review

    Duplicate citation keys · line 8 · lecun2015deep

    The key "lecun2015deep" is used 2 times (lines 8, 78). Rename all but one; keys are not changed automatically.

  • Needs review

    Duplicate citation keys · line 78 · lecun2015deep

    The key "lecun2015deep" is used 2 times (lines 8, 78). Rename all but one; keys are not changed automatically.

  • Needs review

    Duplicate DOIs · line 8 · lecun2015deep

    DOI 10.1038/nature14539 also appears in "bishop2006pattern". These may be the same work; nothing is deleted.

  • Needs review

    Duplicate DOIs · line 61 · bishop2006pattern

    DOI 10.1038/nature14539 also appears in "lecun2015deep". These may be the same work; nothing is deleted.

  • Safe formatting

    DOI prefixes · line 8 · lecun2015deep

    Remove the resolver prefix from the DOI: https://doi.org/10.1038/nature14539 → 10.1038/nature14539.

  • Safe formatting

    Months and page ranges · line 8 · lecun2015deep

    Write the month as may (BibTeX month macro) instead of {May}.

  • Safe formatting

    Months and page ranges · line 8 · lecun2015deep

    Write the page range with an en dash (--): 436-444 → 436--444.

  • Needs review

    Empty fields · line 8 · lecun2015deep

    The field "note" is empty. Remove it?

  • Needs review

    Redundant fields · line 8 · lecun2015deep

    Remove "abstract" (listed in your redundant-field rules)?

  • Needs review

    Redundant fields · line 8 · lecun2015deep

    The URL only points to the DOI, which is already given. Remove the url field?

  • Safe formatting

    Whitespace and indentation · line 8 · lecun2015deep

    Normalise indentation, spacing and line breaks.

  • Safe formatting

    Field order · line 8 · lecun2015deep

    Put fields in the standard order (author, title, journal, year, …); unknown fields keep their order at the end.

  • Needs review

    Incomplete entries · line 22 · vaswani2017attention

    @article usually needs journal or journaltitle.

  • Needs review

    URLs · line 22 · vaswani2017attention

    The URL https://papers.nips.cc/paper/7181-attention is all you need.pdf contains spaces; encode them as %20 or remove them.

  • Safe formatting

    Whitespace and indentation · line 22 · vaswani2017attention

    Normalise indentation, spacing and line breaks.

  • Safe formatting

    Months and page ranges · line 31 · He_2016_CVPR

    Write the month as jun (BibTeX month macro) instead of {June}.

  • Safe formatting

    Months and page ranges · line 31 · He_2016_CVPR

    Write the page range with an en dash (--): 770–778 → 770--778.

  • Needs review

    Redundant fields · line 31 · He_2016_CVPR

    Remove "mendeley-groups" (listed in your redundant-field rules)?

  • Safe formatting

    Whitespace and indentation · line 31 · He_2016_CVPR

    Normalise indentation, spacing and line breaks.

  • Safe formatting

    Field order · line 31 · He_2016_CVPR

    Put fields in the standard order (author, title, journal, year, …); unknown fields keep their order at the end.

  • Safe formatting

    Whitespace and indentation · line 42 · jmlr-vol

    Normalise indentation, spacing and line breaks.

  • Informational

    Incomplete entries · line 46 · srivastava2014dropout

    @article usually needs journal or journaltitle, which may come from its cross-reference.

  • Needs review

    URLs · line 46 · srivastava2014dropout

    The URL www.jmlr.org/papers/v15/srivastava14a.html has no scheme; add https://.

  • Safe formatting

    Whitespace and indentation · line 46 · srivastava2014dropout

    Normalise indentation, spacing and line breaks.

  • Safe formatting

    Field order · line 46 · srivastava2014dropout

    Put fields in the standard order (author, title, journal, year, …); unknown fields keep their order at the end.

  • Safe formatting

    Months and page ranges · line 54 · goodfellow2016chapter

    Write the page range with an en dash (--): 224-270 → 224--270.

  • Informational

    Incomplete entries · line 54 · goodfellow2016chapter

    @incollection usually needs booktitle, year or date, which may come from its cross-reference.

  • Informational

    Incomplete entries · line 54 · goodfellow2016chapter

    crossref refers to "goodfellow2016book", which is not in this file.

  • Safe formatting

    Whitespace and indentation · line 54 · goodfellow2016chapter

    Normalise indentation, spacing and line breaks.

  • Safe formatting

    Field order · line 54 · goodfellow2016chapter

    Put fields in the standard order (author, title, journal, year, …); unknown fields keep their order at the end.

  • Informational

    Field names · line 61 · bishop2006pattern

    "readstatus" is not a standard BibTeX or BibLaTeX field. Styles usually ignore it; it is kept.

  • Safe formatting

    Whitespace and indentation · line 61 · bishop2006pattern

    Normalise indentation, spacing and line breaks.

  • Safe formatting

    Field order · line 61 · bishop2006pattern

    Put fields in the standard order (author, title, journal, year, …); unknown fields keep their order at the end.

  • Safe formatting

    Whitespace and indentation · line 71 · schr2020note

    Normalise indentation, spacing and line breaks.

  • Safe formatting

    Field order · line 71 · schr2020note

    Put fields in the standard order (author, title, journal, year, …); unknown fields keep their order at the end.

  • Needs review

    Incomplete entries · line 78 · lecun2015deep

    @article usually needs author, journal or journaltitle.

  • Safe formatting

    Whitespace and indentation · line 78 · lecun2015deep

    Normalise indentation, spacing and line breaks.

Citation keys are never changed and no entry is ever deleted. Malformed entries are written back exactly as they were. Field removals and other judgement calls are applied only when you tick them.

Before and after

OriginalCleaned
6 unchanged lines
7
7
8@article{lecun2015deep,
8@article{lecun2015deep,
9removed: title={Deep learning},
9added: author = {LeCun, Yann and Bengio, Yoshua and Hinton, Geoffrey},
10removed: author = {LeCun, Yann and Bengio, Yoshua and Hinton, Geoffrey},
10added: title = {Deep learning},
11removed: journal = nat,
11added: journal = nat,
12removed: volume={521}, number={7553},
12added: year = {2015},
13removed: pages = {436-444},
13added: month = may,
14removed: year={2015},
14added: volume = {521},
15removed: month = {May},
15added: number = {7553},
16removed: doi = {https://doi.org/10.1038/nature14539},
16added: pages = {436--444},
17removed: url = {https://doi.org/10.1038/nature14539},
17added: doi = {10.1038/nature14539},
18removed: abstract = {Deep learning allows computational models ...},
18added: url = {https://doi.org/10.1038/nature14539},
19removed: note = {}
19added: note = {},
20added: abstract = {Deep learning allows computational models ...}
20}
21}
21
22
22@article{vaswani2017attention,
23@article{vaswani2017attention,
23removed: author = {Vaswani, Ashish and Shazeer, Noam and Parmar, Niki and others},
24added: author = {Vaswani, Ashish and Shazeer, Noam and Parmar, Niki and others},
24removed: title = {Attention is All you Need},
25added: title = {Attention is All you Need},
25 booktitle = {Advances in Neural Information Processing Systems},
26 booktitle = {Advances in Neural Information Processing Systems},
26removed: year = 2017,
27added: year = 2017,
27removed: pages = "5998--6008",
28added: pages = "5998--6008",
28removed: url = {https://papers.nips.cc/paper/7181-attention is all you need.pdf}
29added: url = {https://papers.nips.cc/paper/7181-attention is all you need.pdf}
29}
30}
30
31
31@InProceedings{He_2016_CVPR,
32@InProceedings{He_2016_CVPR,
32removed: author = {He, Kaiming and Zhang, Xiangyu and Ren, Shaoqing and Sun, Jian},
33added: author = {He, Kaiming and Zhang, Xiangyu and Ren, Shaoqing and Sun, Jian},
33removed: title = {Deep Residual Learning for Image Recognition},
34added: title = {Deep Residual Learning for Image Recognition},
34removed: booktitle = {Proceedings of the {IEEE} Conference on Computer Vision and Pattern Recognition ({CVPR})},
35added: booktitle = {Proceedings of the {IEEE} Conference on Computer Vision and Pattern Recognition ({CVPR})},
35removed: month = {June},
36added: year = {2016},
36removed: year = {2016},
37added: month = jun,
37removed: pages = {770–778},
38added: pages = {770--778},
38removed: mendeley-groups = {Thesis/Chapter3},
39added: mendeley-groups = {Thesis/Chapter3}
39}
40}
40
41
1 unchanged line
42@xdata{jmlr-vol,
43@xdata{jmlr-vol,
43 journaltitle = jmlr,
44 journaltitle = jmlr,
44removed: volume = {15},
45added: volume = {15}
45}
46}
46@article{srivastava2014dropout,
47@article{srivastava2014dropout,
47 author = {Srivastava, Nitish and Hinton, Geoffrey and Krizhevsky, Alex and Sutskever, Ilya and Salakhutdinov, Ruslan},
48 author = {Srivastava, Nitish and Hinton, Geoffrey and Krizhevsky, Alex and Sutskever, Ilya and Salakhutdinov, Ruslan},
48removed: title = {Dropout: {A} Simple Way to Prevent Neural Networks from Overfitting},
49added: title = {Dropout: {A} Simple Way to Prevent Neural Networks from Overfitting},
49removed: xdata = {jmlr-vol},
50added: date = {2014},
50removed: date = {2014},
51added: pages = {1929--1958},
51removed: pages = {1929--1958},
52added: url = {www.jmlr.org/papers/v15/srivastava14a.html},
52removed: url = {www.jmlr.org/papers/v15/srivastava14a.html},
53added: xdata = {jmlr-vol}
53}
54}
54@incollection{goodfellow2016chapter,
55@incollection{goodfellow2016chapter,
55removed: author = {Goodfellow, Ian},
56added: author = {Goodfellow, Ian},
56removed: title = {Regularization for Deep Learning},
57added: title = {Regularization for Deep Learning},
57removed: crossref = {goodfellow2016book},
58added: pages = {224--270},
58removed: pages = {224-270},
59added: crossref = {goodfellow2016book}
59}
60}
60
61
61@book{bishop2006pattern,
62@book{bishop2006pattern,
62removed: author = {Bishop, Christopher M.},
63added: author = {Bishop, Christopher M.},
63removed: title = {Pattern Recognition and Machine Learning},
64added: title = {Pattern Recognition and Machine Learning},
64removed: publisher = {Springer},
65added: year = {2006},
65removed: year = {2006},
66added: publisher = {Springer},
66removed: doi = {10.1038/nature14539},
67added: doi = {10.1038/nature14539},
67removed: langid = {english},
68added: langid = {english},
68removed: readstatus = {read},
69added: readstatus = {read}
69}
70}
70
71
71removed: @misc(schr2020note,
72added: @misc{schr2020note,
72removed: author = "Schr{\"o}dinger, Erwin and M{\"u}ller, J.",
73added: author = "Schr{\"o}dinger, Erwin and M{\"u}ller, J.",
73removed: title = "Notes on {$\alpha$}-helices \& {DNA}",
74added: title = "Notes on {$\alpha$}-helices \& {DNA}",
74removed: howpublished = "Lecture notes" # " (unpublished)",
75added: year = 2020,
75removed: year = 2020
76added: howpublished = "Lecture notes" # " (unpublished)"
76removed: )
77added: }
77
78
78@article{lecun2015deep,
79@article{lecun2015deep,
79 title = {Deep learning (duplicate key)},
80 title = {Deep learning (duplicate key)},
80removed: year = {2015}
81added: year = {2015}
81}
82}
82
83
4 unchanged lines

Cleaned bibliography

The report lists every finding with its line, key and whether you applied it. The ZIP holds the cleaned and original files and both reports. Nothing is saved in your browser.

How to use this tool

  1. 1Paste your bibliography, open a .bib file or load the example.
  2. 2Choose the operations to run, the sort order and BibTeX or BibLaTeX as the target.
  3. 3Go through the diagnostics and tick or untick each proposed change; the side-by-side view updates as you go.
  4. 4Copy or download the cleaned .bib file, and the report as CSV or JSON if you need a record.

Frequently asked questions

No. Keys are never renamed, even when two entries share one; the duplicate is reported so you can decide which to rename. No entry is ever deleted, and an entry with a syntax error is written back exactly as it was.

Changes that do not alter what BibTeX or Biber reads: indentation and aligned = signs, the standard field order, removing https://doi.org/ from DOI fields, month macros such as may (or numbers for BibLaTeX) and -- in page ranges. They are ticked by default, and you can untick any of them.

Anything that removes information: empty fields, fields in your redundant-field list (abstract, file, mendeley-groups and so on) and URLs that only repeat the DOI. They are listed under Needs review and are applied only when you tick them. Duplicate keys, duplicate DOIs, incomplete entries and bad URLs are reported for you to fix by hand.

Yes. The file is read by a tokenizer that keeps the exact text of every value, so case-protecting braces such as {IEEE}, escaped characters such as {\"o} and \&, math, @string macros, # concatenation, @preamble, @comment blocks and % comments are written back unchanged. Only whitespace between words is tidied when formatting, never inside URL, DOI or file fields.

Yes. It knows the BibLaTeX data model, including journaltitle, date, xdata, xref and entry types such as @online and @report, and checks that crossref, xref and xdata targets exist in the file. Choose the BibLaTeX target to write months as numbers, as Biber expects.

A second, independent parser reads each entry and reports any it cannot understand. It is only used to report problems; it never rewrites your file. A warning from it means the entry is worth checking, not that BibTeX will fail.

No. Parsing, checking and formatting all run in your browser, and nothing is saved. The bibliography is gone when you close or refresh the page unless you download it.