Wonders

The Rabbit Hole · Citation guides

How to Cite Software and Code

Cite software, a code repository or an R or Python package in APA 7, MLA 9, Chicago 18 and IEEE, using CITATION.cff, a Zenodo DOI and the package's own citation() output.

Sep 22, 2026
How to Cite Software and Code

TL;DR

Look for the citation the authors already wrote: a CITATION.cff file in the repository, a CITATION file that R's citation() prints, or a Zenodo DOI on the release. Cite the version you ran, not the project in general, and give the archived DOI rather than a branch URL, because a branch changes and a DOI does not. Software in common use in your field usually needs naming in the text but no reference entry.

Software is now a research output in its own right, and the bodies that set citation rules have caught up: IEEE reproduces the FORCE11 Software Citation Principles in full in its Reference Guide, and APA has a dedicated computer-software reference form. The practical problem is different from the one you have with an article. There is no title page. The version changes. The authors are often a project rather than a person. The answer in almost every case is to look for the citation the authors already wrote.

Where the Citation Usually Already Exists

  1. CITATION.cff in the repository root. A YAML file in the Citation File Format holding authors, title, version, release date, licence and DOI. Code hosting platforms read it and offer a formatted citation.
  2. An R package's own citation. Running citation("ggplot2") in R prints the maintainers' preferred citation and a BibTeX entry. CRAN publishes the same citation on the package's citation page, built from the same CITATION file, though the two renderings punctuate the tail slightly differently.
  3. A DOI on an archived release. Zenodo mints a DOI per release and a concept DOI that always resolves to the newest one.
  4. A "How to cite" section in the README or documentation.

Two real examples run through this guide, both verified on 22 September 2026:

What to Collect

Quick Reference by Major Style

APA (7th Edition)

APA treats software like a report with a bracketed description. The format below is the one the University of Queensland Library publishes in its APA 7th guide, which also states when a reference entry is needed at all.

Author, A. A., or Group. (Year). Title of software (Version x.x) [Computer software]. Publisher. URL

Druskat, S., Spaaks, J. H., Chue Hong, N., Haines, R., Baker, J., Bliven, S., Willighagen, E., Pérez-Suárez, D., & Konovalov, O. (2021). Citation File Format (Version 1.2.0) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.5171937

The pandas development team. (2024). pandas (Version 2.2.2) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.10957263

In-text: (Druskat et al., 2021) and (The pandas development team, 2024)

All nine of the Citation File Format's authors appear in the reference, because APA lists up to twenty. Truncating a software author list to the first few names is the commonest way a software reference goes wrong: the CITATION.cff is there precisely so that nobody has to guess who contributed.

For a mobile app the same guide uses [Mobile app] in place of [Computer software] and names the store (Apple App Store or Google Play) as the publisher.

On whether to include a reference at all, the UQ guide is explicit: software that is common in your field or to your audience does not need an in-text citation or a reference entry — name it and the version in the text, as in "Covidence (Version 2)". A reference is required when access or distribution is limited, and when you have quoted or paraphrased from the software or its documentation.

MLA (9th Edition)

MLA has no software template; you build the entry from the template of core elements, and titles of software and apps are italicised. The MLA Style Center's ruling on computer-aided design software is the useful general principle: if you used the program only as a tool to produce a figure, it is the medium rather than the work, so it needs no works-cited entry — name it in your prose or figure caption instead.

When the software itself is the object of study, or when you are citing an archived release as a work, the template gives:

Author. Title of Software. Version, Publisher or Archive, Year, DOI or URL.

Druskat, Stephan, et al. Citation File Format. Version 1.2.0, Zenodo, 2021, doi.org/10.5281/zenodo.5171937.

In-text: (Druskat et al.)

Chicago (18th Edition)

The Chicago Manual of Style is subscription-only, and its free Citation Quick Guide has no software entry — it covers books, articles, news, reviews, interviews, theses, websites, social media, video and podcasts, and stops there. The nearest published Chicago 18th form is Murdoch University Library's, which files apps and software under Internet Content and treats them as web pages: Author, A. A. Year. "Title of Webpage: Subtitle." Title or Description of Website. URL. Its own example is StudentVIP. 2017. "Lost on Campus." studentvip.com.au/maps.

That form has nowhere to put a version number or a DOI, which is exactly what a software reference needs, so use it only if your department insists on Chicago and has nothing better. Otherwise consult CMOS 18 through your library. What the elements must carry is the same everywhere: author or project, version, year, archive and DOI.

Harvard (Cite Them Right)

This is a genuine gap, and it is worth stating plainly. Two Harvard guides were read in full for this page on 22 September 2026 — the University of Sheffield's, which states that it follows Cite Them Right, and the University of York's — and neither publishes an example for a code repository or a package release. Cite Them Right Online itself is a subscription product, so what the current edition says could not be checked here. Sheffield does publish a form for a mobile app:

Developer/Producer (Year of release/update) Title of app (Version) [Mobile app]. Available at: app store name (Downloaded: date).

If your department requires Harvard for software, ask your librarian for the current Cite Them Right entry rather than copying a format from a citation generator. A format that no manual publishes is not a Harvard format.

IEEE

IEEE devotes a section of its Reference Guide to software, reproduces the FORCE11 Software Citation Principles, and asks for the version and a persistent identifier.

[1] J. K. Author. Title of Software. (Date). Repository or Archive. (version or year). Publisher Name. Accessed: Date (when applicable). [Type of Medium]. Global Persistent Identifier. Available: site/path/file

[1] S. Druskat et al. Citation File Format. (2021). Zenodo. (version 1.2.0). doi: 10.5281/zenodo.5171937.

In-text: [1]

IEEE's own worked examples in that section are shorter than the basic format, because they omit elements the projects do not publish; the guide's general instruction is to supply as much of the listed metadata as exists.

An R package, cited the way the maintainers ask

CRAN's ggplot2 citation page — the same text citation("ggplot2") builds from the package's own CITATION file — carried this on 22 September 2026, quoted here exactly as CRAN renders it:

Wickham H (2016). ggplot2: Elegant Graphics for Data Analysis. Springer-Verlag New York. ISBN 978-3-319-24277-4. https://ggplot2.tidyverse.org.

The same page prints the matching BibTeX entry, with publisher = {Springer-Verlag New York}, year = {2016} and isbn = {978-3-319-24277-4}. R's console rendering of the same entry punctuates the tail slightly differently, which is a reminder to copy from one source and not to stitch two together.

Note what that citation points at: a book, not the package. Many R packages do this, because the maintainers would rather you cited the methods paper or book than the code. Convert it into your required style as a book reference — in APA, Wickham, H. (2016). ggplot2: Elegant graphics for data analysis. Springer-Verlag New York — and add a separate reference for the package release only if you need to pin the version you ran. When a package prints two citations, cite both; that is what the maintainers are asking for.

Missing Elements

No version number. Give the release date and, if you can, the commit identifier. A commit hash is a precise locator even when there is no release tag.

No DOI. Use the repository URL and an access date, and say in your methods which commit or tag you used.

No named authors. Use the project name as a group author, as pandas does.

No release date. Use the date of the commit or the archive deposit, and say which.

Common Mistakes

Sources for These Formats

Full style rules: IEEE, APA, MLA, Chicago, Harvard.

Wonders exports the sources you save as BibTeX, RIS or CSV, or straight to Zotero, so a software paper you find there reaches your reference manager with its DOI intact. The release metadata still comes from the project’s own CITATION.cff or archive record.

Frequently asked questions

Do I have to cite every piece of software I used?

No. The convention across styles is that software in common use needs no reference entry: name it and its version in your methods or prose. A reference entry is for software whose distribution is limited, software you are making a claim about, or software whose authors ask to be cited. The University of Queensland's APA guide states the common-use exception explicitly, and MLA says the same about CAD tools: the program is the medium, not the work.

What is CITATION.cff?

A plain-text file, in the Citation File Format, that a project puts in the root of its repository so that both people and tools know how the authors want to be cited. It holds authors, title, version, release date, licence and usually a DOI. If a repository has one, use it: it is the authors' own answer to your question.

How do I get a citation for an R package?

Run citation("packagename") in R. It prints the citation the maintainers wrote, along with a BibTeX entry. Some packages point at a journal article or a book rather than at the package itself, which is what the maintainers want you to cite. In Python there is no single equivalent, so check the project's README, CITATION.cff or documentation.

Should I cite the repository or the archived release?

The archived release. A repository URL points at whatever the branch holds today, so a reader following it may not see the code you ran. Zenodo, Software Heritage and similar archives mint a DOI for a specific release; cite that, and include the version number as well.

What if the software has no named author?

Use the group or project as author, exactly as the archive records it. The pandas release archived on Zenodo, for example, is credited to "The pandas development team", and that is what belongs in the author position.

More useful guides

All citation guides

Finding these guides useful?

Try these techniques in Wonders — an AI workspace for literature review. 14 days free. Students get 50% off.

Start free →