Which licence fits your code?
Eighteen licences, explained the same way every time: what it lets you do, what it makes you do, and the one thing people get wrong. No account, no paywall, and the tables work without JavaScript.
The eighteen
Every card opens the same shape of answer, so two licences can be read side by side.
Apache License 2.0
PermissiveMIT plus an explicit patent grant a NOTICE-file convention and a rule that modified files must be marked.
YesNothingBSD 2-Clause License
PermissiveMIT in different words: keep the notice and the disclaimer and do what you like with the code.
YesNothingBSD 3-Clause License
PermissiveBSD-2 plus a no-endorsement clause: you may not use the authors' names to promote your fork.
YesNothingISC License
PermissiveMIT and BSD-2 collapsed into two sentences — functionally the same permissions.
YesNothingMIT License
PermissiveThe shortest licence people actually read: keep the copyright line and you can do almost anything else with the code — including shipping it inside a closed product.
YesNothingzlib License
PermissiveA short permissive licence that also forbids removing the origin notice and requires altered versions to be marked as altered.
YesNothingEclipse Public License 2.0
Weak copyleftModule-level copyleft with a patent grant and a commercial-friendly linking story. Its secondary-licence option can allow GPL distribution in some configurations, but the FSF still treats EPL-2.0 as incompatible with the GPL.
YesDistributionGNU LGPL v2.1
Weak copyleftWeak copyleft for libraries: you can link it into a closed application as long as users can replace the library.
YesDistributionGNU LGPL v3.0
Weak copyleftLGPL v2.1 rewritten on top of GPLv3 — same linking allowance plus patent terms and a route to convert to GPLv3.
YesDistributionMozilla Public License 2.0
Weak copyleftFile-level copyleft: files you modify must stay MPL while the rest of your project can be licensed however you want.
YesDistributionGNU AGPL v3.0
Strong copyleftGPLv3 plus section 13: if users interact with your modified version over a network you must offer them the source.
YesNetwork useGNU GPL v2.0
Strong copyleftYou may sell software under it but if you distribute a derivative work you must hand recipients the source under the same licence.
YesDistributionGNU GPL v3.0
Strong copyleftSame copyleft as v2 plus an explicit patent grant user-protection against locked firmware and compatibility with Apache-2.0.
YesDistributionCC0 1.0 Universal
Public domainCreole's public-domain dedication written for data and content but also used for code.
YesNothingThe Unlicense
Public domainA public-domain dedication: the author gives up copyright interest so the code can be used with no conditions at all.
YesNothingBusiness Source License 1.1
Source availableSource-available: you get the code but production use is limited until the change date (at most four years) when it converts to an open licence.
PartlyNothingElastic License 2.0
Source availableSource-available: you may use copy modify and distribute it but not provide it to others as a managed service.
PartlyNothingServer Side Public License v1
Source availableSource-available with a service clause: offering it as a service means releasing the entire service stack not just the program.
PartlyNetwork useWhere the trouble starts
Three failure modes account for most of the licence questions people actually ask.
Apache-2.0 into GPL-2.0
The one compatibility answer that surprises people: two permissive-looking projects that cannot be merged, because Apache's patent and indemnity terms count as extra restrictions under GPL-2.0.
Read the comparisonThe AGPL network trigger
No distribution required. If outside users talk to your modified version over a network, section 13 asks you for the source — and a download link is enough.
What AGPL requires“Open source” on the tin
BUSL, SSPL and Elastic-2.0 ship their source and are still not open source. The distinction matters the moment a procurement form asks the question.
Source-available explainedCompared in pairs
The pairs with the most search volume, diffed field by field.
MIT License vs Apache License 2.0
Default for libraries and small tools that want maximum adoption. / Corporate-friendly default when patents ma…
MIT License vs GNU GPL v3.0
Default for libraries and small tools that want maximum adoption. / New GNU projects and anything that wants p…
MIT License vs GNU GPL v2.0
Default for libraries and small tools that want maximum adoption. / Legacy kernel-adjacent and embedded projec…
MIT License vs BSD 3-Clause License
Default for libraries and small tools that want maximum adoption. / Projects that want credit protection but n…
MIT License vs BSD 2-Clause License
Default for libraries and small tools that want maximum adoption. / Minimal permissive projects that dislike t…
MIT License vs ISC License
Default for libraries and small tools that want maximum adoption. / Small JavaScript and C utilities where lic…
Reading a licence in five minutes
- Find the outbound licence.The LICENSE file, or the
licensefield in package.json / pyproject.toml. If the file is missing, the code is all rights reserved by default — not public. - Decide what you are doing with it.Linking, copying, modifying and serving are four different questions, and copyleft answers them differently.
- Check the disclosure clause.“Nothing”, “distribution” or “network” is the single line that decides whether your build pipeline needs to publish source.
- Check the patent and trademark clauses.Only some licences grant patents. None of the common ones grant trademarks.
Still stuck between two? The chooser asks four questions and names one licence; the compatibility matrix answers the “can I mix these” question with a one-way table.
Questions
Is every licence on this site open source?
No. 14 of the 18 carry OSI approval. BUSL-1.1, SSPL-1.0 and Elastic-2.0 are source-available rather than open source, and CC0 is a public-domain dedication that OSI has never approved.
Can I use MIT code in a GPL-3.0 project?
Yes. Permissive code can move into a copyleft project, and the combined work goes out under GPL-3.0. The reverse is not true.
Do I need a lawyer to pick a licence for my own project?
Not for the common cases. Pick MIT or Apache-2.0 for libraries you want adopted widely, and read the obligations page once so you can answer the question later.
What if a repository has no licence file?
Then you have no permission to copy, modify or redistribute it. Public visibility is not a licence.
Does AGPL apply to internal tools?
Section 13 is triggered by users interacting over a network. An internal tool used only by your own staff normally is not, but that is a fact-specific call.