BibTeX Formatter

Paste or open a .bib file and get it back in one clean layout: lowercase field names, braces around every value, fields in a consistent order, the same work entered twice removed, and no two entries sharing a key. It changes how the file is laid out and never what a field says. It runs in your browser, so your bibliography is not uploaded.

Formatted

What a tidy .bib file looks like

BibTeX reads a messy file as happily as a neat one, so a bibliography that has passed through three reference managers and two co-authors usually carries all of their habits at once: AUTHOR here and author there, quotation marks in one entry and braces in the next, the same paper twice under two keys. None of that changes the PDF. It changes how hard the file is to read, to search and to merge when two people edit it.

  • One field per line, in the same order every time. Author, title, where it appeared, year, then identifiers. A missing year is then obvious at a glance.
  • Braces, not quotation marks. Both are legal. Braces nest, so a title that contains a quotation mark needs no special care.
  • Page ranges with two hyphens. pages = {97--111} prints an en dash; one hyphen prints a hyphen.
  • Each work once. Two entries for one paper put it in the reference list twice the day both keys are cited.
  • Each key once. BibTeX reports a repeated entry and ignores the second, which is how a citation ends up pointing at the wrong paper.

What it leaves alone, on purpose

Titles keep their capitals and their protecting braces, journal names are not abbreviated or expanded, and author names are not reordered: those are decisions a bibliography style or an author makes. Month abbreviations such as jan stay abbreviations, so a style can print them in its own language. To build entries instead of tidying them, use DOI to BibTeX or the RIS to BibTeX converter; to send a .bib to EndNote or Mendeley, use BibTeX to RIS. More on the two systems in BibTeX or biblatex.

Frequently asked questions

What does the BibTeX formatter change?

The layout, never the content. Entry types and field names become lowercase, every value is wrapped in braces, fields are put in a consistent order with the equals signs aligned, a single hyphen in a page range becomes the double hyphen LaTeX expects, and each entry is separated by one blank line. What each field says is left exactly as you wrote it.

How does it find duplicate BibTeX entries?

Two entries are treated as the same work when they share a DOI, or when they have the same title, year and first author once capitals, accents and punctuation are set aside. The first one is kept, the later one is left out, and the report under the output names both so you can check.

What happens to an entry it cannot read?

It is reported with its line number and left out of the output, and every other entry is still formatted. The usual causes are a brace or a quotation mark that never closes, or a field with no equals sign. Fix that entry in your file and run it again.

Can it rename citation keys?

Yes, as an option. Keys can be rebuilt as author and year (knuth1984) or author, year and the first word of the title (knuth1984literate). Leave it on Keep unless the document is new: renaming a key breaks every \cite that uses the old one.

Is my bibliography uploaded?

No. The file is read and formatted in your browser. Nothing is sent to LetX, unless you choose to open the result as a LetX project.

Does the output work with biblatex and Biber?

Yes. The same .bib file is read by BibTeX and by Biber. Fields that only biblatex knows, such as date, journaltitle and location, are kept and ordered with the rest.

Keep the .bib next to the paper

LetX is a free collaborative LaTeX editor: your references, your co-authors and the compiled PDF in one place.

Open the free editor