Skip to main content
v2026.11,772 entries · CC-BY 4.0

Adding Citations and a Bibliography in Overleaf

How to link a .bib file, cite sources, and compile a bibliography in Overleaf using either BibTeX or BibLaTeX, including the Zotero/Mendeley direct-import route.

Written and maintained by CASRAI Editorial Board

Last updated

Overleaf does not have its own citation system — it compiles standard LaTeX, so the mechanics are the same BibTeX or BibLaTeX workflow you would use anywhere, plus one Overleaf-specific convenience: you never have to remember the multi-pass compile order yourself. This guide walks through getting a .bib file into a project, the two command sets (classic BibTeX vs. BibLaTeX/biber), linking a Zotero or Mendeley library directly, and the errors that trip people up most often.

If you are setting conventions for a multi-author team — who owns the shared .bib file, how citation keys are named — see LaTeX and Overleaf for Collaborative Research Writing. This page is the mechanics: the exact commands and steps for one author getting citations working.

Three ways to get a .bib file into your project

A bibliography in LaTeX always starts from a .bib file — a plain-text database of entries (@article, @book, and so on), each with a citation key you will reference in the text. Overleaf gives you three ways to create one:

  • Write it by hand. Files panel → “New file” → name it something like references.bib, then add entries directly. Fine for a handful of sources, tedious past that.
  • Upload an existing file. If you already export a .bib file from a reference manager — Zotero, Mendeley, EndNote, or Paperpile all support exporting to BibTeX format — use the Upload button in the Files panel and add it to the project.
  • Link a Zotero or Mendeley account directly. Overleaf supports authorizing a Zotero or Mendeley account from inside the upload dialog and importing your library as a .bib file in one step, without a separate manual export. See the dedicated section below.

Filenames on Overleaf are case-sensitive — References.bib and references.bib are different files to the compiler, and a mismatch between the filename and what your document calls is one of the most common “why is not my bibliography showing up” causes.

The classic BibTeX workflow

With plain BibTeX, two commands in your document body do the work:

\bibliographystyle{plain}
\bibliography{references}

\bibliographystyle sets the citation style (plain, ieeetr, and other named .bst styles — see LaTeX Bibliography Styles Explained for the full set and how to pick one for a journal template). \bibliography points at your .bib file by name, without the .bib extension.

Inside the text, cite a source with:

\cite{smith2023}

where smith2023 matches a citation key in your .bib file exactly (case-sensitive, same rule as filenames).

You do not need to run the compile sequence manually. Locally, resolving BibTeX citations requires running pdflatex, then bibtex, then pdflatex twice more — four separate passes, in that order, because each pass resolves a different layer (citation numbers, then the reference list, then cross-references to it). Overleaf’s own documentation states it uses the latexmk build tool, which detects when a bibliography needs re-resolving and automatically reruns the necessary passes on every compile. Hitting “Recompile” once is enough; you do not hand-run the sequence the way you would with a bare local pdflatex/bibtex install.

The BibLaTeX/biber workflow

BibLaTeX is the newer, more actively developed alternative, and it uses a different command set entirely — mixing the two systems’ commands in one document is the single most common cause of a bibliography silently failing to appear. In the preamble:

\usepackage[backend=biber, style=alphabetic, sorting=ynt]{biblatex}
\addbibresource{references.bib}

backend=biber is BibLaTeX’s default and recommended backend (it provides fuller localization than the older backend=bibtex option); style picks the citation style, and sorting controls list order (ynt = year, name, title; other options include nty, nyt, and none). Note \addbibresource, not \bibliography — and the .bib extension is included here, unlike the BibTeX form above.

Citing works the same way (\cite{smith2023}, plus BibLaTeX-specific variants like \parencite for a parenthetical citation), but instead of \bibliography{...} at the point you want the list to appear, use:

\printbibliography

which also accepts filtering/heading options, e.g. \printbibliography[type=article, title={Articles only}] to print just one reference type under its own heading. Because BibLaTeX’s default backend is biber rather than bibtex, Overleaf’s latexmk auto-detection covers this the same way — you still just click Recompile — but if you inherit a project from someone else and citations are not resolving, check that the project’s compiler settings match what the preamble expects (a document written for biber will not resolve correctly if something in the project forces the bibtex backend).

For which named style to actually choose, and how BibTeX’s .bst files and BibLaTeX’s style= option relate, see LaTeX Bibliography Styles Explained — that guide covers style selection in depth rather than repeating it here.

Linking your Zotero or Mendeley library directly

Rather than exporting a .bib file from your reference manager and re-uploading it every time your library changes, Overleaf can import directly: from the Files panel’s upload dialog, choose the option to connect a Zotero or Mendeley account, authorize access, and Overleaf pulls your library in as a .bib file added to the project. This is a one-step alternative to the manual export both managers already support (Zotero and Mendeley can each export a collection to BibTeX format on their own, for anyone who would rather manage the file by hand or is using EndNote or Paperpile, which also export to .bib).

Treat an imported library as a snapshot taken at import time, not a live two-way sync — if you add or edit entries in Zotero or Mendeley afterward, re-run the import (or re-export and re-upload) to bring the .bib file in your project up to date, the same way you would refresh any imported file. For the underlying tools themselves — storage limits, group libraries, Word/Google Docs integration — see Zotero for Researchers and Zotero vs. EndNote vs. Mendeley.

Fixing the most common errors

  • “Citation undefined” warnings in the compiled PDF. Almost always a mismatched key: check the exact spelling and case of the key in \cite{} against the entry in your .bib file, and confirm the filename in \bibliography{}/\addbibresource{} matches the actual uploaded file’s case exactly.
  • The bibliography section does not appear at all. Check you have not mixed BibTeX (\bibliographystyle + \bibliography) and BibLaTeX (\usepackage{biblatex} + \addbibresource + \printbibliography) commands in the same document — they are not interchangeable, and combining them is the most frequent cause of a reference list that silently never renders.
  • A journal template’s citations look “wrong” after you drop in your own .bib file. Usually a style mismatch rather than a data problem — confirm which engine and style the template’s preamble already specifies before changing anything, per the style guide linked above.

Frequently asked questions

Do I need to compile with bibtex manually on Overleaf?

No. Overleaf compiles through latexmk, which detects when a bibliography needs resolving and reruns the necessary passes automatically on every “Recompile” — unlike a bare local LaTeX install, where you run pdflatex, bibtex, pdflatex, pdflatex yourself in that order.

Does Overleaf keep syncing with my Zotero or Mendeley library after I link it?

The import brings your library in as a .bib file at the moment you connect it, not as an ongoing live sync — treat it as a snapshot and re-run the import (or re-export and re-upload) after you add or edit entries in Zotero or Mendeley.

Can I use more than one .bib file in the same document?

Yes — both \bibliography{} and \addbibresource{} accept a comma-separated list of files, so you can combine a personal library with one shared across a co-author team.

Why do BibTeX and BibLaTeX use different commands for the same thing?

They are separate systems built at different times, not two settings on one system — BibLaTeX was written later as a more flexible, actively-maintained replacement, with its own command set and, by default, its own backend program, biber, instead of the older bibtex program. See LaTeX Bibliography Styles Explained for how the two engines differ in more depth.

Follow CASRAI

Research-administration guidance, standards updates and independent tool reviews.

Ask CASRAI · included with Regulatory Radar

Ask about Adding Citations and a Bibliography in Overleaf

Ask CASRAI answers research-administration questions and cites the passages behind every claim — and says so when the corpus does not cover something, instead of guessing. It comes with a Regulatory Radar subscription at $29 a month, alongside the daily digest of regulatory changes and the dashboard of what changed.

150 questions a day, on this site, over the API, or inside your own tools through the CASRAI MCP server.

Everything CASRAI publishes — this page, the dictionary, the guides and the news — stays free to read, with no account and no card.

Referenced across the research world

University of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logoUniversity of Cambridge logoColumbia University logoCrossref logoUniversity of Edinburgh logoHarvard University logoUniversity of Oxford logoPrinceton University logoStanford School of Medicine logoUniversity College London logoORCID logo
  • University of Cambridge logo
  • Columbia University logo
  • Crossref logo
  • University of Edinburgh logo
  • Harvard University logo
  • University of Oxford logo
  • Princeton University logo
  • Stanford School of Medicine logo
  • University College London logo
  • ORCID logo

View CASRAI adoption →

Regulatory Radar

Stop finding out after the fact

$29/month, cancel anytime. Daily digest updates from our analysis, a dashboard holding the same items, and a cited assistant for everything they raise.

  • Federal Register, Federal Register+, Grants.gov, Regulations.gov, NSF News, UKRI, plus CASRAI’s own published content.
  • 72,264 indexed passages, and every answer cites the ones it drew on.