Choose before you publish
Open source license picker
A public repository with no license is not open source: by default nobody else may use, copy or change it. Pick a license before you launch. Answer up to eight questions about what you want to allow and require, and the picker ranks the licenses that fit, shows what each one permits, requires and rules out, and writes the header notice for the one you choose.
Everything runs in this page. Nothing you type is sent anywhere. This is general information and not legal advice, and the rules are a simplification of what are legal documents.
Your shortlist
1. MIT License (MIT)
Short and permissive. Anyone may use it in open or closed projects if the notice stays.
+1 permissive and widely understood
2. Apache License 2.0 (Apache-2.0)
Permissive, with an explicit patent grant, a trademark exclusion and a clause for contributions.
+1 permissive and widely understood
3. BSD 3-Clause "New" or "Revised" License (BSD-3-Clause)
Like BSD 2-Clause, plus a clause that bars using the authors' names to endorse derived products.
+1 permissive and widely understood
Comparison
Permissions, conditions and limitations as listed on choosealicense.com.
| License (SPDX) | OSI | Permissions | Conditions | Limitations |
|---|---|---|---|---|
| MIT | Approved | Commercial use, Distribution, Modification, Private use | License and copyright notice | Liability, Warranty |
| Apache-2.0 | Approved | Commercial use, Distribution, Modification, Private use, Patent use | License and copyright notice, State changes | Liability, Trademark use, Warranty |
| BSD-3-Clause | Approved | Commercial use, Distribution, Modification, Private use | License and copyright notice | Liability, Warranty |
| BSD-2-Clause | Approved | Commercial use, Distribution, Modification, Private use | License and copyright notice | Liability, Warranty |
| Unlicense | Approved | Commercial use, Distribution, Modification, Private use | None | Liability, Warranty |
| MPL-2.0 | Approved | Commercial use, Distribution, Modification, Private use, Patent use | Disclose source, License and copyright notice, Same license (file) | Liability, Trademark use, Warranty |
| GPL-3.0-only | Approved | Commercial use, Distribution, Modification, Private use, Patent use | Disclose source, License and copyright notice, Same license, State changes | Liability, Warranty |
| LGPL-3.0-only | Approved | Commercial use, Distribution, Modification, Private use, Patent use | Disclose source, License and copyright notice, Same license (library), State changes | Liability, Warranty |
| AGPL-3.0-only | Approved | Commercial use, Distribution, Modification, Private use, Patent use | Disclose source, License and copyright notice, Network use is distribution, Same license, State changes | Liability, Warranty |
License header for MIT
Copyright (c) 2026 [copyright holder] SPDX-License-Identifier: MIT Licensed under the MIT License. Full license text: https://spdx.org/licenses/MIT.html
The full text is linked, not embedded. Put the complete text of the license in a file named LICENSE in the root of your repository.
This is general information, not legal advice. Licenses are legal documents. Read the full text of the one you pick, and ask a lawyer if money, patents or a company are involved.
Sources: choosealicense.com, the license pages for each license listed; choosealicense.com, non-software licenses; Open Source Initiative, approved licenses.
How to use it
- Say what you are licensing. Choose software code, documentation, or data and media. Documentation and data point to the Creative Commons licenses made for them.
- Answer the questions. Say whether you want an explicit patent grant, whether closed-source products may build on your work, whether changes must be shared back and how far that reaches, and whether you care about trademarks, contributions or giving up all rights.
- Read the shortlist and the table. The top three are shown with the reasons they scored as they did. The table below compares every candidate side by side using the permissions, conditions and limitations that choosealicense.com lists.
- Copy the header. Enter the copyright holder, the year and the project name, choose the license you want, and copy the header notice. Then save the full license text, linked from the page, as a file named LICENSE.
How the shortlist is ranked
The candidates are MIT, Apache-2.0, BSD-2-Clause, BSD-3-Clause, MPL-2.0, LGPL-3.0, GPL-3.0, AGPL-3.0 and the Unlicense for code, plus CC0-1.0 and CC-BY-4.0 for documentation and data. The facts encoded for each license come from its page on choosealicense.com: the permissions (commercial use, distribution, modification, patent use, private use), the conditions (license and copyright notice, state changes, disclose source, same license at file, library or project level, network use is distribution) and the limitations (liability, warranty, trademark use, patent use). OSI approval and SPDX identifiers come from the Open Source Initiative license list. The 3.0 GNU licenses are shown in their SPDX form with the suffix only; each also exists in an or-later form.
Each answer adds or removes points. An explicit patent grant counts for Apache-2.0, MPL-2.0 and the GNU licenses. If you want closed-source products to be allowed, permissive licenses score highest and strong copyleft scores lowest. If you want changes shared back, or no closed forks, licenses without copyleft are heavily penalised and the rest are scored by how close their reach is to the one you chose: files (MPL-2.0), library (LGPL-3.0), whole program (GPL-3.0) or network use (AGPL-3.0). A trademark exclusion counts for Apache-2.0, MPL-2.0 and, in a smaller way, BSD-3-Clause, whose non-endorsement clause covers names but not marks in general. Ties are broken in a fixed order, MIT first. The rules are tested for every combination of answers.
Two licenses in the list are not approved by the Open Source Initiative: CC0-1.0 and CC-BY-4.0. They are included because they are the usual choice for data, text and media, and Creative Commons itself does not recommend them for software, so the picker never offers them for code. If your answers conflict, for example allowing closed forks and requiring share-alike, the picker says so and leans to the weak copyleft licenses that sit between the two. The picker does not read your dependencies, so it cannot tell you whether a license is compatible with the libraries you use. Check that separately.
Questions
Is this legal advice?
No. It is general information built from public summaries of the licenses. Licenses are legal documents with details a summary leaves out. Read the full text of the license you choose, and speak to a lawyer if a company, money or patents are involved.
What if I do not pick a license?
Then the default copyright rules apply and other people have no permission to use, change or share your code, even if it is public. Add a license before you launch.
MIT or Apache-2.0?
Both are permissive. MIT is shorter. Apache-2.0 adds an explicit patent grant, a clause on contributions and a statement that trademark rights are not granted. If those matter to you, choose Apache-2.0.
Can I change the license later?
You can license new versions differently, but copies people already received keep the license they came with. Outside contributions can make a change harder, because each contributor holds rights in their own work.
Why are CC0 and CC BY on the list if they are not OSI approved?
They are the usual choice for documentation, data and media. The Open Source Initiative approves licenses for software, and Creative Commons does not recommend its licenses for software, so the picker only offers them for non-code work.
Where does the full license text go?
In a file named LICENSE in the root of your repository. The header the picker writes is a short notice for the top of that file or of your source files. The page links to the full text rather than embedding it.