BibTeX to APA 7: setting up biblatex-apa in LaTeX
To go from BibTeX to APA 7 citations and references in LaTeX, load biblatex with the APA style: \usepackage[backend=biber,style=apa]{biblatex}, add your file with \addbibresource{references.bib}, cite with \parencite and \textcite, print the list with \printbibliography, and compile with Biber, not BibTeX. Your existing .bib file works as it is. Below are the exact setup, the settings a thesis needs, and the fixes for the errors I see most.
- In the preamble, add
\usepackage{csquotes}, then\usepackage[backend=biber,style=apa]{biblatex}and\addbibresource{references.bib}(with the.bibextension). - Delete any
\bibliographystyle{…}and\bibliography{…}lines: biblatex replaces both. - Cite with
\parencite{key}for (Morgan & Hunt, 1994) and\textcite{key}for Morgan and Hunt (1994). - Where the list should go, write
\printbibliography[heading=bibintoc,title={References}]. - Compile with Biber: on Overleaf, click Recompile; on your computer, run
latexmk -pdf thesis.
01LaTeX APA style setup with biblatex-apa
biblatex-apa is the LaTeX style that formats citations and references in APA 7. It is a style for biblatex, the package that reads your .bib file and builds the citations, and its CTAN page says it implements most of the APA 7th edition guidelines. It needs csquotes, biblatex and the Biber program, all included in TeX Live and on Overleaf. This preamble is all it takes:
\documentclass[12pt,a4paper]{report}
\usepackage[british]{babel}
\usepackage{csquotes}
\usepackage[backend=biber,style=apa]{biblatex}
\addbibresource{references.bib}
\begin{document}
\chapter{Literature review}
Trust exists when one party believes the other is
reliable \parencite{morgan1994}. \textcite{chaudhuri2001}
link brand trust to brand loyalty.
\printbibliography[heading=bibintoc,title={References}]
\end{document}
Line by line: babel sets the language of the thesis, and biblatex takes its words ("and", "p.", "Retrieved") from it. The biblatex-apa manual recommends american, which also moves commas and full stops inside closing quotation marks as APA does; a British thesis can keep british if its guide expects British punctuation. csquotes handles quotation marks; the biblatex-apa manual lists it as required. The style=apa option loads biblatex-apa for both the citations and the reference list. \addbibresource names the .bib file, and the biblatex manual says the file must be given with its full name, extension included.
The last line prints the reference list. The two options matter in a thesis, because the report and book classes otherwise give the list the heading "Bibliography" and leave it out of the table of contents (section 05 explains why).
The entry in Figure 1 uses the old BibTeX field names journal and year. biblatex treats journal as an alias for its own journaltitle field, so a .bib file written for BibTeX needs no changes to start with. Clean-ups that make the output fully APA are in section 06.
If you are building the thesis itself from scratch, my guide to a LaTeX thesis template and setup gives a complete main.tex with this preamble, chapter files and roman page numbers for the front matter.
02Compile with Biber
Biber is the program that sorts and processes the .bib entries for biblatex, in the step between two LaTeX runs. biblatex-apa only works with Biber: if the document asks for backend=bibtex, LaTeX stops with "Package biblatex Error: Biber backend is required by style." A full compile is LaTeX, then Biber, then LaTeX twice, and the build tools below do that for you.
On Overleaf
Click Recompile. Overleaf builds the project with latexmk, which runs Biber when the log asks for it. If citations still show as bold keys after a change to the .bib file, open the Recompile menu and choose Recompile from scratch, which deletes the generated files and compiles again.
On your computer
- With latexmk (part of TeX Live and MiKTeX), run
latexmk -pdf thesisin the folder ofthesis.tex. latexmk reads the log and runs Biber and LaTeX as many times as needed. - By hand, run
pdflatex thesis,biber thesis, thenpdflatex thesistwice. Biber takes the same base name as LaTeX (biber thesis); there's no need to type.bcf. - In TeXstudio, put
% !BIB program = biberon the first line of the main file. TeXstudio's manual says this magic comment sets its bibliography tool to Biber for that document. You can also set Biber as the default bibliography tool for every document in TeXstudio's options.
Biber writes its own log, thesis.blg, next to the PDF. A missing comma or brace in one .bib entry shows up there as an error with a line number, while the LaTeX log only says that Biber needs to run again. On Overleaf the file is listed under Logs and output files.
03Convert an old BibTeX document to APA 7
Converting a BibTeX document to APA 7 means swapping the BibTeX style for biblatex: you keep the .bib file and change three things in the .tex file. This matters because the older APA options for BibTeX don't produce APA 7. CTAN describes apacite as APA 6th edition, and the apa7 class manual says its apacite and natbib options "will produce citations in 6th edition format"; only its biblatex option follows APA 7.
A typical BibTeX document has these lines:
\usepackage{natbib} % or \usepackage{apacite}
…
\citep{morgan1994} … \citet{chaudhuri2001}
…
\bibliographystyle{apalike}
\bibliography{references}
- Remove
\usepackage{natbib}or\usepackage{apacite}. Both clash with biblatex. - Add
\usepackage{csquotes},\usepackage[backend=biber,style=apa,natbib=true]{biblatex}and\addbibresource{references.bib}to the preamble. - Delete
\bibliographystyle{…}, and replace\bibliography{references}with\printbibliography[heading=bibintoc,title={References}]. - Clear the old auxiliary files (
latexmk -C thesis, or Recompile from scratch on Overleaf), then compile with Biber.
The natbib=true option is optional. The biblatex manual describes it as a compatibility module with aliases for natbib's commands, so a thesis full of \citep and \citet keeps working: in my test, \citep{morgan1994} printed (Morgan & Hunt, 1994) and \citet{morgan1994} printed Morgan and Hunt (1994). For a new document, use biblatex's own commands from section 04.
If \bibliographystyle stays in the document, biblatex stops with "'\bibliographystyle' invalid for 'biblatex'". If \bibliography{references} stays in the body, LaTeX stops with "LaTeX Error: Can be used only in preamble." Both errors point to the old lines, not to your references.
Choosing between biblatex, natbib and plain BibTeX for other citation styles is covered in my guide to the LaTeX bibliography: BibTeX, biblatex and natbib.
04APA citation commands in LaTeX
APA citations in LaTeX come from two biblatex commands. \parencite gives a parenthetical citation, with author and year in brackets: (Morgan & Hunt, 1994). \textcite gives a narrative citation, with the author as part of the sentence: Morgan and Hunt (1994). APA's in-text citation checklist asks for a comma between author and year in parenthetical citations and the year in brackets after the author in narrative ones, and biblatex-apa follows both.
| You type | It prints | Use it for |
|---|---|---|
\parencite{morgan1994} | (Morgan & Hunt, 1994) | Most citations |
\textcite{morgan1994} | Morgan and Hunt (1994) | The author as the subject of the sentence |
\parencite[p.~25]{morgan1994} | (Morgan & Hunt, 1994, p. 25) | Quotations; [25] alone also gives "p. 25" |
\parencite[25--27]{morgan1994} | (Morgan & Hunt, 1994, pp. 25–27) | A page range |
\parencite[see][]{morgan1994} | (see Morgan & Hunt, 1994) | A word before the citation; mind the empty [] |
\parencite{morgan1994,chaudhuri2001} | (Chaudhuri & Holbrook, 2001; Morgan & Hunt, 1994) | Several works, sorted alphabetically for you |
\textcite{weijters2009} | Weijters et al. (2009) | Three or more authors: "et al." (biblatex-apa uses it from the first citation) |
\cite{morgan1994} | Morgan and Hunt, 1994 | Rarely: no brackets, so it isn't an APA citation on its own |
Note. Output from biblatex-apa 9.20 with \usepackage[british]{babel}. With another main language, the word between two authors in a narrative citation follows that language.
\parencite and \textcite cover almost every citation in a thesis; the optional arguments add a page number or a word such as "see" or "e.g.,".The rule for "et al." is APA's: a work by three or more authors is cited with the first author's name followed by "et al." (APA in-text citation checklist). biblatex-apa does this every time, including the first citation, with no setting to change.
One case needs a special command. APA leaves out the brackets around the year when a narrative citation is already inside brackets. The biblatex-apa manual provides \nptextcite for this: (e.g., \nptextcite{morgan1994}) prints (e.g., Morgan & Hunt, 1994). The manual adds that with LuaLaTeX, \textcite handles this by itself. In most theses, \parencite[e.g.,][]{morgan1994} gives the same result more simply.
The rules behind these citations, from page numbers to group authors, are in my guide to APA in-text citations.
05What biblatex-apa does for APA 7, and what it leaves to you
biblatex-apa formats the entries: names, dates, titles, italics, DOIs, ordering and the hanging indent. The page around the list is left to your document class: the heading, its place in the table of contents, the line spacing and the new page. In a thesis, the university's guide decides those page-level settings, and they often differ from APA's student paper rules.
| APA 7 rule | biblatex-apa | What to do |
|---|---|---|
| Hanging indent of 0.5 in | Yes | Nothing |
| Alphabetical order by first author | Yes | Nothing |
| Initials, & before the last author, up to 20 authors | Yes | Full names in the .bib file are fine |
| Article and book titles in sentence case | Yes, if the entry's language is English | Protect names with braces; in a thesis not written in English, add langid = {english} to English entries (section 06) |
| DOI as https://doi.org/…, no full stop after it | Yes | Put only the bare DOI in the doi field |
| No publisher location | Yes, address is ignored | Nothing |
| Retrieval dates only for pages that change | Prints any urldate on an entry without a DOI | Remove urldate from articles and books |
| Label "References" | Only in classes without chapters | title={References} |
| Double spacing, no extra space between entries | No space added between entries | Line spacing comes from the document |
| List starts on a new page | No | The report and book classes start it as a chapter |
Note. Rules from APA's Creating an APA Style Reference List Guide and Reference Guide for Journal Articles, Books, and Edited Book Chapters; behaviour from the biblatex-apa 9.20 code and my test compiles.
.bib file.Heading and table of contents
APA asks for the label "References", centred and bold, at the top of a new page (APA, Creating an APA Style Reference List Guide). The biblatex manual explains why a thesis doesn't get it by default: with a class that has chapters, \printbibliography uses an unnumbered chapter heading, not listed in the contents, with the word "Bibliography". I checked this in the report class: the plain command printed "Bibliography" and left it out of the table of contents.
The fix is the two options from section 01: heading=bibintoc adds the entry to the table of contents and title={References} changes the word. How the heading looks (centred or not, its size) then follows your chapter headings, which is what most thesis guides want. My guide to the LaTeX table of contents covers the contents page itself.
Line spacing
APA's reference list guide asks for double spacing within and between references, with no extra blank lines. biblatex-apa sets the space between entries to zero, so the list simply follows the line spacing of the document. With \usepackage{setspace} and \doublespacing in the preamble, the list is double spaced like the text. Some university guides ask for single spacing within each reference and a blank line between references instead. Your university's guide takes priority over APA's student paper rules.
Should a thesis use the apa7 class?
The apa7 class is a LaTeX document class for APA papers, with journal, manuscript, student paper and plain document modes. Its manual recommends biblatex for 7th edition references: with the biblatex class option it loads biblatex with style=apa, and without that option you load it yourself in the preamble, so citations look the same as in the setup above. The class is built for papers and journal manuscripts, so for a thesis use your university's class or the report class, and add biblatex-apa to it.
06Write .bib entries that come out right in APA
biblatex-apa can only format what the .bib file holds, so most wrong APA references in a LaTeX thesis start in the entries. Four habits fix nearly all of them: type titles in normal title case and wrap names in braces, put only the bare DOI in the doi field, delete urldate from articles and books, and give English entries langid = {english} when the thesis is in another language.
Titles: let the style change the case
APA writes article and book titles in sentence case, where only the first word, the first word after a colon and proper nouns take a capital (APA, Reference Guide for Journal Articles, Books, and Edited Book Chapters). biblatex-apa converts titles to sentence case for you, so type them as they are published. Anything inside braces is left exactly as typed, so protect names and acronyms: title = {Why {Netflix} Subscribers Stay} prints "Why Netflix subscribers stay". Don't wrap the whole title in a second pair of braces, or none of it changes.
Journal names stay in title case, as APA wants. A subtitle can go in its own subtitle field or after a colon in the title; in my tests both gave a capital on the first word after the colon.
DOIs and URLs
APA puts a DOI at the end of every reference that has one, as an https://doi.org/ link, and leaves out the URL when there is a DOI (APA, Creating an APA Style Reference List Guide). biblatex-apa adds the https://doi.org/ part itself, so the doi field must hold only the DOI: doi = {10.1509/jmkg.65.2.81.18255}. A full link in the field prints as https://doi.org/https://doi.org/…. If you have hundreds of entries, this preamble code strips the prefix from every doi field while Biber reads the file:
\DeclareSourcemap{
\maps[datatype=bibtex]{
% keep only the DOI itself in the doi field
\map{
\step[fieldsource=doi,
match=\regexp{^https?://(dx\.)?doi\.org/},
replace={}]
}
% no "Retrieved ... from" on articles and books
\map{
\pertype{article}
\pertype{book}
\step[fieldset=urldate, null]
}
}
}
The second map handles retrieval dates. Reference managers often export the date you saved an item as urldate, and biblatex-apa prints it as "Retrieved March 3, 2025, from …" on any entry with a URL and no DOI. APA's reference list guide says most references don't need a retrieval date; it is only for works designed to change over time, such as a profile page, when you cite a version that isn't archived. The map removes it from articles and books and keeps it on web pages. Both maps change only what Biber reads, never the .bib file itself.
Three hundred .bib entries to clean before the deadline?I can check them against APA 7 for you
A thesis written in another language
biblatex changes titles to sentence case only for English. Its manual says the conversion applies when the entry's langid field, or else the main document language, is one of american, british, canadian, english, australian or newzealand. In a thesis whose main language is Portuguese, German or Spanish, English titles therefore stay in title case. This is the most common APA fault I find in non-English LaTeX theses, because the reference list looks finished at a glance.
The fix is a langid field on every English entry: langid = {english}. In my test with Portuguese as the main language, the Morgan and Hunt title went from "The Commitment-Trust Theory of Relationship Marketing" to "The commitment-trust theory of relationship marketing" after adding it. Entries in Portuguese stay as typed, which suits Portuguese capitalisation. biblatex-apa takes words such as "and" and "Retrieved" from the main language (see the note under Figure 2). Whether the reference list should follow the thesis language is a university rule, so check your guide.
Entry types for theses and books
biblatex-apa follows the APA manual's examples, and its test file has a .bib entry for each one. A doctoral thesis is @phdthesis with school (or institution) for the university; a master's thesis is @mastersthesis. For an unpublished thesis, add type = {Unpublished doctoral dissertation}, as the biblatex-apa test file does for APA's example 64; the style then prints [Unpublished doctoral dissertation]. University name. A thesis without that field prints [Doctoral dissertation, University name], the form APA uses for a thesis published in a database or archive; for that case, put the database or archive in publisher, as the test file's example 65 does. For a book, put the edition as a number (edition = {2}) and the style prints (2nd ed.). How to write each entry type is covered in my guide to BibTeX entries and citations, and the APA rules for citing a thesis in APA dissertation citation.
07Why are my APA references wrong in LaTeX?
Wrong APA references in LaTeX usually have one of seven causes: Biber didn't run, an old BibTeX line is still in the file, the backend is set to BibTeX, the doi field holds a full link, the entry carries a urldate, the thesis language switches off sentence case, or the heading is the class default. I reproduced each one in TeX Live 2025 with biblatex-apa 9.20. Figure 4 shows four of them on one page.
doi field held a full link, a title left in title case because the whole title was wrapped in double braces, and "Retrieved March 3, 2025, from" because the DOI link sat in the url field with a urldate. After: the heading set with title={References}, bare DOIs in the doi field, single braces around the title, and the DOI moved from the url field to the doi field.Citations print as bold keys such as morgan1994
Bold citation keys mean Biber hasn't run since the citation was added, or it ran and failed. The LaTeX log then says "Please (re)run Biber on the file". Compile again with latexmk or Overleaf's Recompile. If the keys stay, open thesis.blg and fix the .bib error it names, and check that the key in \parencite matches the entry's key exactly, including capitals.
"Biber backend is required by style"
The document loads biblatex with backend=bibtex, and biblatex-apa refuses it. Change the option to backend=biber (or leave it out: Biber is biblatex's default) and make sure your editor runs Biber, as in section 02.
"'\bibliographystyle' invalid for 'biblatex'" or "Can be used only in preamble"
An old BibTeX line is still in the document. Delete \bibliographystyle{…}, and replace \bibliography{…} at the end of the thesis with \printbibliography, as in section 03.
The DOI appears twice
The doi field holds a full link. Keep only the part that starts with 10., or add the sourcemap from section 06.
"Retrieved … from" appears on journal articles
The entry has a url and a urldate but no doi. If the work has a DOI, move it to the doi field: biblatex-apa then prints the DOI and drops the URL and date. Otherwise delete urldate, or use the sourcemap.
Titles stay in title case
Either the thesis language isn't English and the entry has no langid = {english}, or the whole title is wrapped in double braces. Fix the entry and compile again with Biber.
The list is headed "Bibliography" and missing from the contents
That is the default in the report and book classes. Use \printbibliography[heading=bibintoc,title={References}].
Submission next week and the references still won't behave?Send me the project and I'll fix the LaTeX side
08BibTeX to an APA reference outside LaTeX
To turn a BibTeX entry into an APA reference you can paste somewhere else, such as a Word document or a form, import the .bib file into Zotero and copy the references in APA style. Zotero imports BibTeX and BibLaTeX files and formats them with any citation style, APA 7 included.
- In Zotero, choose File › Import…, pick A file, and select your
.bibfile. - Select the imported items, right-click them and choose Create Bibliography from Item(s)….
- Choose the APA 7th edition style (listed as APA Style 7th edition, or American Psychological Association 7th edition in older installations), set the output mode to Bibliography and the output method to Copy to Clipboard. Click OK and paste.
Check the result the same way as in LaTeX: titles in sentence case, a DOI on every article that has one, no retrieval dates on articles. Zotero formats what the import gives it, so a title typed in capitals in the .bib file needs fixing in Zotero too. Going the other way, a reference list from Word into a LaTeX thesis, is part of my guide to converting Word to LaTeX.
09Questions people ask
Is there a BibTeX .bst style for APA 7?
The common BibTeX option for APA, apacite, follows the 6th edition, according to its CTAN page and the apa7 class manual. For APA 7 references in LaTeX, use biblatex with style=apa and compile with Biber.
Do I need to rewrite my .bib file for biblatex-apa?
No. biblatex-apa reads a BibTeX .bib file as it is, including the old field names journal, address and school. Rewriting helps only where the output is wrong: full DOI links, retrieval dates, missing langid fields or titles in double braces.
Is there an APA LaTeX template on Overleaf?
Yes. Overleaf's template gallery has an APA section (APA templates on Overleaf), but those templates are added by users, several still follow APA 6, and they are built for papers, not theses. For a thesis, keep your university's class or a report-class template and add the biblatex-apa lines from section 01; check that any template you use loads style=apa, not apacite.
Can I use APA 6 in LaTeX if my university still asks for it?
Yes. The biblatex-apa manual points to a separate package, biblatex-apa6, for the 6th edition; its style files are named apa6, so you load it with style=apa6 instead of style=apa and compile with Biber as before.
Does biblatex-apa work with XeLaTeX and LuaLaTeX?
Yes. biblatex-apa is independent of the engine, and with LuaLaTeX its \textcite even drops the brackets around the year inside a parenthesis by itself. Use the polyglossia lines from its manual if your thesis uses polyglossia instead of babel.
I compiled every preamble, command, sourcemap and error on this page with TeX Live 2025 on Windows 11: pdfTeX 1.40.27, biblatex 3.20, biblatex-apa 9.20, Biber 2.20 and latexmk, in the report class with British and with Portuguese as the main language. APA rules come from APA's own handouts; package behaviour from the biblatex, biblatex-apa and apa7 manuals and the biblatex-apa source. All pages are listed under Sources.
Sources
- biblatex-apa: BibLaTeX citation and reference style for APA CTAN
- APA BibLaTeX style, version 9.20 (manual) CTAN
- biblatex-apa source and APA example .bib files GitHub, package home page
- The biblatex Package (manual) CTAN
- apa7: format documents in APA style (7th edition) and its manual CTAN
- apacite: citation style following the rules of the APA CTAN
- latexmk manual CTAN
- Creating an APA Style Reference List Guide APA Style
- Reference Guide for Journal Articles, Books, and Edited Book Chapters APA Style
- In-Text Citation Checklist APA Style
- Bibliography management with biblatex Overleaf
- Biblatex bibliography styles Overleaf
- Clearing the project cache Overleaf docs
- The latexmkrc file Overleaf docs
- APA templates Overleaf
- Advanced: magic comments TeXstudio manual
- Importing standardized formats Zotero documentation
- Creating bibliographies Zotero documentation