The Library
Checking sign-in
Lovelace's SquareThe Square

Licenses

A plain guide to the licenses for code, data and documents

This is a plain guide, not legal advice

Licenses are legal texts, and the details depend on your country and your contract. For an important decision, read the full license and ask your institution. Good places to start are choosealicense.com, Creative Commons and the Open Source Initiative.

If you want to share code, a dataset, a document or an interactive component with the rest of the world, choosing its license may not be the easiest part. The license is a very important part of sharing, perhaps the most important one, because it sets what others can do with your work, and once someone has a copy under it, you cannot take it back.

As researchers, much of what we produce is paid for with public money, and it is meant to serve society: to be read, checked, reused and built upon. Over the last decade, this commitment has grown into the open science movement. Funders, universities and journals now ask us to share not only our articles, but also our data, our code and our teaching materials. Sharing has become part of research work, and so has the question of how to share. Many of us also fear that our work could be misused, or used with intentions we do not share. This is why how we share matters: the way we share is what gives us some control over what others can do with our work, even if no license can fully stop someone who chooses to ignore it. Yet in academia there is still some confusion about what a license actually covers, and this can lead to misunderstandings when the time comes to choose one. Part of the reason is that, when it comes to rights, there are clear zones that apply almost everywhere, and gray zones that depend on the country, on the specific case, and sometimes even on how a court interprets it. This guide clarifies those terms and explains the options, so that you can decide according to your expectations, your obligations and your personal position. To keep things simple, this guide speaks in general terms and leave most exceptions aside; at the end, we cover the ones you are most likely to meet in academia.

The term copyright was born with the printing press. Imagine you are in 16th-century London and you write a text by hand. That handwritten text is the "copy", the original that someone will print. You give it, or sell it, to a printer. Today we would think the text is still yours, but back then it was not: what counted was who was going to print it. The printer registers the text in his own name with the printers' guild, and from then on only he can print it; if another printer tries, the guild stops him. That exclusive right over the text, over who could multiply it, was the right in the "copy": the copy right. You, the author, are left with nothing more than what you were paid for the manuscript, if anything, while the printer can sell the right or leave it to his children, like a house. This only changed in 1710, when an English law, the Statute of Anne, gave the right to authors for the first time, and only for a limited time. That is where modern copyright comes from.

Today copyright covers much more than printing: it is the exclusive right to copy, share and change a work. In much of Europe the same idea is called author's rights, a name that puts the person who made the work, rather than the copies, at the center.

Copyright is not a right over a particular copy, but over the work itself. Having a copy, such as a downloaded PDF or a cloned repository, does not give you any of those rights. And copyright applies automatically, from the moment the work is made, with no need to register anything or add a © symbol.

Two simple examples. Say you are an independent author, with no affiliation to any university or company:

  • A paper. You write a paper and post the PDF on your website. From the moment you wrote it, the copyright is yours. Anyone can download the PDF, but having that copy does not allow them to republish it, translate it or include it in a course pack without your permission, unless you specify the conditions through a license.
  • Code. You write a script and put it on GitHub without a license. The copyright is yours too. Anyone can clone the repository and read the code, but they cannot copy it into their own project, change it and share it, or sell it without your permission, unless you specify the conditions through a license.

In both cases, you did not have to register anything, and the work is yours. But what happens if you made it as part of your job, or because someone paid you to make it? That is the next question: who holds the copyright.

Copyright separates two roles. The author is the person who made the work. The rights holder is whoever decides how the work can be copied, shared and changed. Usually they are the same person. In the examples above, where you were an independent researcher with no affiliation, both roles are yours: you are the author, and you hold the rights. But this is not always the case:

  • Software written as part of your job usually belongs to your employer, unless your contract says otherwise.
  • If you signed a copyright transfer agreement with a journal, the publisher may hold the rights to your article. You are still its author, but you may no longer be the one who decides how it is reused.
  • When a work has several authors, they share the rights. In most of Europe, all of them must agree before the work is licensed.

Even when someone else holds the rights, in most of Europe the author keeps some moral rights, such as the right to be named as the author of the work.

A license only makes sense for something that copyright protects. Copyright protects the expression of a work, automatically, from the moment it is made, with no need to register anything.

  • Protected: code, text, slides, figures, photos and interactive components.
  • Not protected: ideas, methods, algorithms as such, and raw data, which are facts. Anyone can read how a method works and write their own code for it.
  • Partly protected: databases. In the EU, a database can have a protection of its own when making it took substantial effort.

Patents and trademarks work differently and are outside the scope of this guide.

A license is permission given in advance by whoever holds the rights to a work, under a few conditions. It tells everyone, at once, what they may do with the work and what they must do in return, such as giving credit. Only the rights holder can grant it: before you choose a license, make sure that you are the one who can.

A license does not transfer your rights: you keep the copyright, and the conditions bind everyone else, not you. You can still use your own work as you like, and even offer it under other terms to someone else.

You do not need to write a license yourself. There are standard licenses, such as Creative Commons for texts and MIT for code, that everyone recognizes. You only have to say which one applies, for example in a LICENSE file or on the first page of a document.

Here is what two of them look like in full. The MIT License, for code, fits on one screen; CC BY 4.0, for content, is longer because it spells out each right and condition.

MIT LicenseFor code · SPDX: MIT · About 170 words

In short. Anyone may use, copy, change and sell the code, as long as they keep this notice. No warranty.

Official text
MIT License

Copyright (c) [year] [your name]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Source: Open Source Initiative.

In plain words, all that text says something quite short. The MIT License means: anyone may use, copy, change, share and even sell your code, as long as they keep your name and the license text with it. The part in capital letters means that the code comes as it is, with no guarantee that it works, and that you cannot be held responsible for any harm it causes. CC BY 4.0 means: anyone may copy, share and adapt your work, for any purpose, including commercial ones, as long as they credit you, link to the license and say whether they changed anything.

These summaries help to understand a license, but they do not replace it. The legal wording may seem long and heavy, yet it is what makes the terms precise: it defines what counts as a copy, an adaptation or proper credit, and it leaves little room for misunderstandings. When in doubt, the full text is the one that applies.

Once you have granted a license, you cannot take it back from anyone who already has a copy under it. You can change the license for future copies, but the earlier ones keep the terms they came with.

Almost every license is built from a handful of conditions:

BY
Attribution

Give credit to the author.

Example. Someone uses your figure in a lecture and writes your name and the source under it.

SA
Share-alike

If you build on code or a document under this license and share your version, share it under the same license. In software this is called copyleft.

Example. Someone translates your slides and shares the translation. It must carry the same license as your original.

NC
Non-commercial

No commercial use.

Example. Someone wants to use your lecture notes in a training course they sell. They need your permission first.

ND
No derivatives

You may share the work, but not a changed version.

Example. Anyone may share your PDF as it is, but nobody may share a corrected, shortened or translated version.

Combining these conditions gives four families of licenses, from the one that gives others the most freedom to the one that keeps the most control for you. At the far end sits plain copyright, all rights reserved, which is what applies when there is no license at all. Each type of work has its own licenses: code uses software licenses; text, slides and figures use Creative Commons licenses; data use CC0, CC BY or ODbL.

More freedom for others
Public domain
no conditions

Anyone may do anything with the work, without even naming you.

CodeUnlicense, 0BSD
ContentCC0
DataCC0, PDDL

Example. Someone puts your photos in a book they sell and does not credit you. That is allowed.

Permissive
BY

Give credit, and nothing else.

CodeMIT, BSD-3-Clause, Apache-2.0
ContentCC BY
DataCC BY, ODC-By

Example. Someone builds your code into a closed product they sell. Allowed, as long as they keep your name and the license notice.

Share-alike
BYSA

Give credit, and keep changed versions under the same license.

CodeGPL, AGPL, LGPL, MPL, EUPL
ContentCC BY-SA
DataCC BY-SA, ODbL

Example. Someone improves your code and distributes it. They must release their changes under the GPL too.

Restrictive
BYNC and/or ND

Adds no commercial use, no changes, or both.

CodePolyForm Noncommercial
ContentCC BY-NC, BY-NC-SA, BY-ND, BY-NC-ND
DataCC BY-NC

Example. A free online course may reuse your slides under CC BY-NC. A paid training course needs your permission.

All rights reserved
©no license

Only the rights holder may copy, change or share the work. This is what applies when there is no license.

Code© All rights reserved, or no license
Content© All rights reserved
Data© All rights reserved

Example. You find a script online with no license, or only a © notice. You may read it, but copying it into your project needs the author’s permission.

More control for you

Creative Commons licenses were written for text, images and data, and Creative Commons itself advises against using them for code. They do not protect what matters in software:

  • They do not require sharing the source code. Under CC BY-SA, someone can improve your program and share, or even sell, only the compiled version (the .exe). They follow the license, but nobody can see or reuse their changes. The GPL prevents this: whoever shares or sells the program must share its code too.
  • They say nothing about patents. Software licenses such as Apache-2.0 and GPL-3.0 do: whoever contributes code also gives users permission to use any patent it covers.
  • They do not mix well with software licenses, so your code is harder to combine with other projects.

For code, use a software license (MIT, Apache-2.0, GPL…). The one exception is CC0, which can be used for code.

There is no single meaning of "non-commercial": each license defines it in its own way. The three Creative Commons licenses with NC (CC BY-NC, CC BY-NC-SA and CC BY-NC-ND 4.0) share one definition: use "not primarily intended for or directed towards commercial advantage or monetary compensation". It sounds clear until you try a few real cases. Which of these is commercial?

  • A university teaches your slides in a master's degree that students pay €6,000 for.
  • A research project funded by an oil producer uses your spectra to build a quality model.
  • Your former PhD student starts a spin-off and builds a product on your toolbox.
  • A company runs an internal course for its own lab staff with your material.

The Creative Commons licenses give no list. In 2009, Creative Commons surveyed internet users in the United States, both people who share their work and people who reuse it, about what they understand by non-commercial.1 Almost everyone agreed on two things: making money with the work is commercial, and so is using it next to online advertising. Beyond that, opinions split. Use by a non-profit organization, by an individual or for a charitable purpose landed in the middle of the scale, neither clearly commercial nor clearly non-commercial. Not even charitable use by a non-profit was rated "definitely non-commercial" by a majority. The study itself lists questions that the definition does not settle:

  • Can a public university sell, in its gift shop, a notebook with an NC image on the cover?
  • Can a blogger use NC images if the blog earns 50 US dollars a month from ads? And 50,000?
  • Can a non-profit sell NC teaching materials to cover its costs? And if it earns one cent more?

Other non-commercial licenses draw the line elsewhere. PolyForm Noncommercial, a license for code, does give a list: personal use for research, study or hobbies is allowed, and so is any use by a charity, an educational institution, a public research organization or a government body, "regardless of the source of funding".2 Under it, if a university runs them, the master's degree and the oil-funded project above are both allowed. Under CC BY-NC, nobody can say for sure. So before you choose or reuse NC material, read how that particular license defines commercial.

NC also travels badly. NC material cannot be mixed with share-alike material such as CC BY-SA or GPL, and it cannot go into projects or repositories that require open licenses.

When you publish in a journal, you are often asked which license you want for your article. Many researchers choose CC BY-NC, thinking that it stops others from making money with their work. It usually does not, and the reason is who holds the rights.

In a traditional subscription journal, you normally sign a copyright transfer agreement: the publisher becomes the rights holder. In many open access journals you keep the copyright, but you may grant the publisher an exclusive license to publish and distribute your article. If you then choose an NC license, anyone who wants to use the article commercially must ask for permission, and they ask the publisher. Elsevier, for example, sends commercial requests for its CC BY-NC-ND articles to its own permissions service.3

This is the paradox. The NC condition binds everyone else, never the rights holder or whoever holds an exclusive license. So NC does not keep commercial users away from your article: it makes them go through the publisher, which can sell that permission.

So, if you are going to give the publisher control over your article anyway, the best option for you is usually to publish it open access under CC BY 4.0. With CC BY, everyone can reuse the article, even for commercial purposes, so nobody holds an exclusive permission to sell. At least the publisher, after taking a good part of your project's funding in publication fees, will not be able to sell the right to use your work as well, because that right is already free for everyone.

A business that already exists

Selling the commercial use of articles is an established business for publishers:

  • Reprints. A reprint is a copy of your article that the publisher prints, or licenses in electronic form, and sells in bulk to a company. Yes: the publisher sells your article. The typical buyer is a pharmaceutical company. When a clinical trial favors one of its drugs, the company orders thousands of copies of the article and hands them to doctors as part of its marketing. You, the author, are not asked and are not paid; the publisher is. A study in The BMJ found that articles with large reprint orders were much more likely to be funded by industry, and that a single journal could earn over a million pounds from them.4 Another study reported that the New England Journal of Medicine sold about one million reprints of a single trial to the drug company Merck, and that in 2005–2006 reprints made up 41% of The Lancet's income.5
  • Training AI models. In 2024, Taylor & Francis agreed to give Microsoft access to part of its library to train AI systems, in a deal worth more than 10 million US dollars in its first year. Authors said they had not been told and could not opt out.6 The same year, Wiley reported that it expected 44 million US dollars from AI licensing deals, also with no opt-out for authors.7

In none of these cases did the authors' choice of license decide the matter. What decided it was who held the rights.

If your worry is "someone will take my work, improve it, sell it and keep the improvements", there are two options that stay open.

Share-alike. Under GPL (code) or CC BY-SA (content), anyone may use your work, even to make money, but if they distribute a changed version, the changes must be shared under the same license. Improvements stay with everyone. So if someone with commercial intentions wants to sell an improved version of your code, built on your effort, they must share their own effort too, by opening their changed code under the same license. For software used over the internet, AGPL extends this to online services.

Dual licensing, or a simple note. As the author, you can offer your work under an open license to everyone and, at the same time, agree other terms with whoever needs them. You do not even need a formal scheme: one line in your README is enough.

This toolbox is released under GPL-3.0. If you need other terms, for
example for commercial use, write to the authors at name@university.edu.

Keep in mind that an open license cannot be taken back from copies already shared. You can change the license of future versions, but not of what people have already downloaded.

Try it yourself. Pick what you are sharing, switch on the conditions you want, and see which license you get, what others can do with your work, and how to apply it.

1What are you sharing?

2Which conditions do you want?

With every condition off, you give up all rights: the work goes into the public domain, as far as the law allows.

3Your license

MIT License

Also: BSD-3-Clause, or Apache-2.0 if you want an explicit patent license.

What others can do

Share copiesWith credit to you
Change it and share the changesUnder any terms
Use it commerciallyIncluding in paid products and services
Keep their changes closedAllowed

How to apply it

LICENSE         ← the full text of the license
README.md       ← "Released under the MIT License (MIT)."
source files    ← // SPDX-License-Identifier: MIT
Misconception

If something is public on the internet and has no copyright symbol and no license, anyone can use it.

In fact

No. Copyright applies automatically, from the moment the work is made, with no need to register it or add a © symbol. The absence of a license has a meaning: the work is fully copyrighted, all rights reserved. This holds for a document, a piece of code or any other resource, whether you find it on GitHub, Zenodo, a personal website or any other platform.

You can look at it, but copying, changing or sharing it needs the rights holder's permission, case by case. Some platforms add a small permission of their own: GitHub's terms, for example, let other users view and fork public repositories on GitHub, but not reuse the code elsewhere. If you want to reuse a resource with no license, write to the author and ask them to add one. And the same applies to your own work: if you publish it without a license, nobody can legally reuse it.

Misconception

If I share my code, someone will take it and sell it.

In fact

They can, if the license allows it, and most licenses for code do. What the license decides is what they must give back.

Under a permissive license such as MIT or Apache-2.0, they only have to keep your name and the license notice, and they can keep their own changes private. Under a share-alike license such as GPL, if they distribute a changed version, they must share the source code of their changes under the same license, so the improvements come back to everyone. If you want anyone with commercial intentions to talk to you before using your work, you can say so in your README or offer them a second license. See Middle ways.

Misconception

A non-commercial license stops anyone from making money with my work.

In fact

Only partly, for three reasons. First, "commercial" is fuzzy: in Creative Commons' own study, people agreed only on the clearest cases, such as making money with the work or using it next to advertising. Second, the NC condition never binds the rights holder: if you transferred your rights to a publisher, the publisher can still sell commercial use of your work. Third, a license only protects you if someone notices a misuse and acts on it, which in practice means you. See What counts as commercial?.

Misconception

GPL software cannot be used commercially.

In fact

It can, and it often is. The GPL does not forbid commercial use: anyone may use GPL software, change it and even sell it. What the GPL asks is that whoever distributes the program, original or changed, also shares its source code under the GPL.

If someone only uses the software in-house and does not distribute it, they do not have to share anything. For software offered as an online service, the AGPL extends this duty to the users who access it over a network.

Misconception

Once I share my work under a license, I can never offer other terms.

In fact

As the rights holder, you can. A license does not transfer your rights: it gives permission to everyone else, and you keep the copyright. So you can offer the same work to someone under other terms, for example to someone who wants to use your GPL code commercially without sharing their changes. This is called dual licensing.

Two limits. You cannot take the license back from anyone who already has a copy under it. And you can only offer other terms for what you hold the rights to: if other people contributed to the work, you need their agreement too.

Misconception

CC BY is fine for code.

In fact

Creative Commons itself advises against it. Its licenses do not require sharing the source code, say nothing about patents, and do not mix well with software licenses. Use a software license such as MIT, Apache-2.0 or GPL. The one exception is CC0, which can be used for code. See Why Creative Commons licenses are not for code.

Misconception

My data are protected by copyright.

In fact

Raw facts are not. A measured spectrum, a temperature or a concentration is a fact, and nobody can own a fact. What copyright can protect is the creative selection or arrangement of a collection, and in the EU a database can also have a protection of its own when making it took substantial effort.

Because the line is blurry, a clear license such as CC0 or CC BY tells everyone what they may do with your data, without anyone having to work out what is protected and what is not. See What can have copyright and what cannot?

Misconception

It is my work, so I decide the license.

In fact

Not always. Being the author does not always make you the rights holder. Software written as part of your job usually belongs to your employer, unless your contract says otherwise. If you signed a copyright transfer agreement, the publisher holds the rights to your article. And when a work has several authors, in most of Europe all of them must agree before it is licensed.

Before you choose, check your contract, your institution's policy and your co-authors. See Who holds the copyright?

Footnotes

  1. Creative Commons, Defining "Noncommercial": A Study of How the Online Population Understands "Noncommercial Use" (2009). ↩

  2. PolyForm Noncommercial License 1.0.0, sections "Personal Uses" and "Noncommercial Organizations". ↩

  3. Elsevier, End user reuse for content published by Elsevier and Copyright. ↩

  4. Handel A. E. et al., "High reprint orders in medical journals and pharmaceutical industry funding: case-control study", BMJ 2012;344:e4212. Full text. ↩

  5. Lundh A. et al., "Conflicts of interest at medical journals: the influence of industry-supported randomised trials on journal impact factors and revenue", PLoS Medicine 2010;7(10):e1000354. Full text. ↩

  6. Times Higher Education, Academic backlash as publisher lets Microsoft train AI on papers (2024). ↩

  7. The Bookseller, Wiley set to earn 44m (US dollars) from AI rights deals, confirms no opt-out for authors (2024). ↩

On this page