Last verified: 3 December 2026. Licence terms checked against Choose a License, the Open Source Initiative approved list and the GNU licence list on 3 December 2026.
- Quick Answer: Open-Source Licences at a Glance
- What Counts as an Open-Source Licence?
- The 7 Open-Source Licences Compared
- MIT License: The Shortest Permission
- BSD 3-Clause License: MIT with One Extra Guard
- Apache License 2.0: Permissive, with Patents Covered
- Mozilla Public License 2.0: Copyleft, One File at a Time
- GNU Lesser General Public License v3: Copyleft for a Library
- GNU General Public License v3: Strong Copyleft for a Whole Program
- GNU Affero General Public License v3: Strong Copyleft for Network Services
- How to Choose Among Open-Source Licences
- Common Mistakes with Open-Source Licences
- How to Apply an Open-Source Licence to Your Own Project
- Frequently Asked Questions About Open-Source Licences
- Are open-source licences free to use in a commercial product?
- Does using open-source code mean I must open-source my whole product?
- Can I change a project’s licence later?
- Is code without a licence open source?
- Do open-source licences cover patents and trademarks?
- What is the difference between GPLv3 and AGPLv3 for a hosted startup?
- The Bottom Line on Open-Source Licences
- Sources
Open-source licences are the permission slip attached to open-source code. Without one, other people can read code published in public, but they have no general permission to use it, change it or pass it on. With one, they have that permission, subject to the conditions the licence sets. The choice matters in both directions: it decides what strangers may do with code you publish, and what your team may do with code you bring into a product.
This guide explains the seven open-source licences a startup meets most often, in plain language, and compares these open-source licences on the points that change a decision: whether changes must stay open, whether patents are covered, whether network use counts, and whether code may end up inside a closed product. It is general information about open-source licences, not legal advice. Where a decision carries real money or risk, have a lawyer review the exact licence text and your exact use.
Quick Answer: Open-Source Licences at a Glance
If you want the widest reuse with the least paperwork, pick a permissive licence: MIT, BSD 3-Clause or Apache 2.0. If you want changes to stay open, pick a copyleft licence, and choose its strength by scope: MPL 2.0 for single files, LGPLv3 for a library, GPLv3 for a whole program, AGPLv3 when the program runs as a network service.
If patents worry you, MIT and BSD 3-Clause give no express patent grant, while Apache 2.0, MPL 2.0, LGPLv3, GPLv3 and AGPLv3 do. If your product is a hosted service using modified copyleft code, only AGPLv3 treats network use as a trigger for sharing source. Those four questions — reuse, openness, patents and network use — settle most choices among open-source licences before finer detail matters.
What Counts as an Open-Source Licence?
Seeing source code is not the same as having open-source permission. Code can be visible in a public repository while remaining closed to reuse. A licence counts as an open-source licence, in the sense used here, when it meets the Open Source Definition maintained by the Open Source Initiative. In brief, as the Initiative puts it, such open-source licences allow software to be freely used, modified and shared, and a licence reaches the approved list only after going through its licence review process.
The Definition sets ten criteria, including free redistribution without a royalty, source code in a form a programmer would prefer for making changes, permission to make derived works, no discrimination against people or fields of endeavour, rights passing automatically to every recipient, and no restriction on other software shipped alongside. The discrimination point is the one startups trip over most: a licence that forbids commercial use, or forbids a competing hosted service, restricts a field of endeavour and does not meet the Definition, however openly the code is displayed. Source-available terms are a different category: they publish code and limit use, while open-source licences publish code and permit use, under stated conditions.
Two distinctions keep the seven open-source licences below in order. The first is permissive against copyleft. A permissive licence lets a recipient ship a modified version under different terms, including closed terms, without sharing source. A copyleft licence requires a distributed modified version to carry the same openness forward, at least for the part it covers. The second is scope: how much of a larger program the sharing duty reaches, from nothing, through one file and one library, to the whole program, and finally to network use. Comparing open-source licences by name alone, without scope, misleads.
The 7 Open-Source Licences Compared
The table summarises the comparison published by Choose a License, restated in this guide’s own wording. All seven open-source licences allow commercial use, distribution, modification and private use, and all seven disclaim warranty and limit liability. They differ in conditions, not in that basic permission.
| Open-source licence | Sharing duty on distribution | Express patent grant | Network use triggers sharing | Trademark rights granted |
|---|---|---|---|---|
| MIT License | None: keep the notices | No | No | Not stated |
| BSD 3-Clause License | None: keep the notices; do not use names to endorse | No | No | Not stated |
| Apache License 2.0 | None: keep the notices and state changes | Yes | No | No |
| Mozilla Public License 2.0 | Modified files only, under the same licence | Yes | No | No |
| GNU LGPLv3 | The library and its changes, under the same licence | Yes | No | Not stated |
| GNU GPLv3 | The whole work, under the same licence | Yes | No | Not stated |
| GNU AGPLv3 | The whole work, including network use | Yes | Yes | Not stated |
All seven appear on the Open Source Initiative approved list checked for this guide. MIT, Apache 2.0, BSD 3-Clause, GPLv3, LGPLv3 and MPL 2.0 sit in its popular and strong-community category; AGPLv3 is also approved, listed in the uncategorised group. Approval answers one question only: the licence meets the Definition. It does not say which licence fits a particular project. That is the work of the sections that follow, licence by licence.
MIT License: The Shortest Permission
Best for: small libraries, examples, and any project where maximum reuse matters more than controlling what recipients do next.
The MIT License is the shortest of the popular open-source licences, and its brevity is its point. Choose a License describes it as a short and simple permissive licence whose conditions require only that copyright and licence notices be preserved. A recipient may use the work commercially, distribute it, modify it and use it privately, and modified works and larger works may be distributed under different terms and without source code. In practice, MIT code can appear inside a closed product, provided the notices travel with it.
Watch out for two limits. First, the MIT License lists no patent use among its permissions and gives no express grant of patent rights, unlike Apache 2.0 and the copyleft licences below. For a small utility that matters little; for a substantial component, it is a real gap, and one reason the GNU project recommends Apache 2.0 over other lax permissive licences for substantial programs. Second, MIT says nothing about trademarks: using MIT code gives no rights in the project’s name or marks. The maintenance burden is the lightest among these open-source licences: keep the notice intact, and there is little else to administer.
BSD 3-Clause License: MIT with One Extra Guard
Best for: projects whose authors care about their name being attached to products they did not build or endorse.
The BSD 3-Clause License, also called the New or Revised BSD License, is a permissive licence close to MIT, with one added clause. Choose a License states the difference plainly: the third clause prohibits others from using the name of the copyright holder or its contributors to promote derived products without written consent. The other conditions match MIT in substance: preserve the copyright and licence notices in source and binary distributions, including the disclaimer. Modified and larger works may go out under different terms and without source, and no express patent grant is listed.
The practical difference is narrow but genuine. A recipient may still fork the code, rename it and sell a product built on it. What the recipient may not do, without specific prior written permission, is present that product as endorsed by the original authors. Do not confuse the 3-clause form with older BSD forms: the original 4-clause licence added an advertising clause, and the 2-clause form drops the endorsement clause. When a project says BSD, check which clause count the licence file actually carries; the GNU project warns that recommending BSD in general risks confusion with the flawed original form. Among open-source licences, BSD 3-Clause is the cautious permissive choice: MIT’s freedom, plus control over endorsement.
Apache License 2.0: Permissive, with Patents Covered
Best for: substantial projects, company-backed libraries, and any code where contributors may hold patents that could affect users.
Apache License 2.0 is permissive like MIT, but written at greater length because it settles questions MIT leaves open. Contributors provide an express grant of patent rights, limited to patent claims their contributions necessarily infringe. Modified files must carry prominent notices stating that they were changed. Copyright, patent, trademark and attribution notices must be retained in distributed source forms, and where the work includes a NOTICE text file, derivative works must include a readable copy of its attribution notices in one of the places the licence specifies. Licensed works, modifications and larger works may still be distributed under different terms and without source code.
Two provisions deserve attention. The licence grants no trademark rights, except as needed to describe the origin of the work and reproduce the NOTICE file. And the patent grant ends for a recipient who starts patent litigation alleging that the work or a contribution in it infringes a patent — a deliberate deterrent. Compatibility is the other point to record: the GNU project states that Apache 2.0 is compatible with GPL version 3, but not with GPL version 2, because of requirements in Apache 2.0 that GPLv2 lacks, including patent termination and indemnification provisions. For teams choosing among permissive open-source licences for a substantial program, Apache 2.0 is the thorough option: more paperwork than MIT, in exchange for patent clarity.
Mozilla Public License 2.0: Copyleft, One File at a Time
Best for: libraries and components where changes to the covered files should come back open, while the rest of a larger program keeps its own terms.
The Mozilla Public License 2.0 is the first copyleft licence here, and the weakest in scope. Its sharing duty attaches at file level. Source code of licensed files, and modifications to those files, must be made available under the same licence, or in certain cases under one of the GNU licences. Notices must be preserved, and contributors provide an express grant of patent rights. A larger work that uses the licensed work may be distributed under different terms and without source code for the files added in the larger work. That boundary is the appeal: a company can combine MPL 2.0 files with proprietary files in one product, provided it keeps the MPL files open and returns changes to them.
Watch out for the file boundary in practice. Adding a new file that contains covered code counts as a modification, while a genuinely separate file added alongside does not automatically become covered. Keep covered files identifiable, keep notices intact, and do not strip licence headers when copying a function into a new file. The licence also excludes trademark rights. Among open-source licences, MPL 2.0 suits teams that want openness to be contagious inside a component, without making it contagious across a whole product.
GNU Lesser General Public License v3: Copyleft for a Library
Best for: libraries intended for wide use, including inside proprietary programs, where changes to the library itself should stay open.
The GNU Lesser General Public License version 3, LGPLv3, is copyleft at library level. Its conditions require making available complete source code of the licensed work and its modifications, under the same licence or under GPLv3. Notices must be preserved, changes must be stated, and contributors provide an express patent grant. The crucial permission, as Choose a License puts it, is that a larger work using the licensed work through interfaces provided by the licensed work may be distributed under different terms and without source code for the larger work. The GNU project explains the same point directly: LGPL is not a strong copyleft licence, because it permits linking with nonfree modules, and it recommends LGPL only for special circumstances.
That recommendation runs against a common instinct, and it is worth understanding. A library author who wants the widest adoption, including by closed programs, may still choose LGPLv3 to keep improvements to the library itself open. A library author who wants every program that uses the library to be open as well should choose GPLv3 instead.
LGPLv3 is compatible with GPLv3, the GNU project states, but not with GPLv2 by itself, although code released under GPLv2 or later terms can be used under GPLv3. When a startup ships a product that links a library, check the licence name, the version and the linking terms together. Among open-source licences, LGPLv3 is the compromise for libraries: open at the centre, permissive at the edges, and easy to misread if the linking boundary is assumed rather than checked.
GNU General Public License v3: Strong Copyleft for a Whole Program
Best for: complete programs where the author wants every distributed modified version, and every work built on the program, to remain open under the same terms.
GPLv3 is the strong copyleft licence against which the others are measured. Its permissions are conditioned on making available complete source code of licensed works and modifications, including larger works that use a licensed work, under the same licence. Notices must be preserved, changes must be stated, and contributors provide an express patent grant. In plain terms, distributing a modified GPLv3 program, or a program built from it, means distributing the source of the whole combined work under GPLv3. Private modification without distribution does not trigger the duty: a team that changes GPLv3 code for its own internal use, and never hands the result to anyone else, is not required to publish those changes. The trigger is distribution.
The GNU project recommends GPLv3 for most software packages. Its costs are equally plain: GPLv3 code cannot simply be folded into a closed product, and combining it with code under incompatible licences creates a combination that cannot lawfully be distributed at all. Version history matters here more than anywhere else among open-source licences. GPLv3 is not compatible with GPLv2 by itself, but most software released under GPLv2 allows use under later GPL versions, in which case the code can be used under GPLv3. Check the licence notice in each file, not only the project readme, because the notice states whether later versions are permitted. Treat licence compatibility as a design constraint from the first dependency, not as a review step before release.
GNU Affero General Public License v3: Strong Copyleft for Network Services
Best for: server software where users interact with a modified version over a network, and the author wants those users to be able to obtain the source.
AGPLv3 starts from GPLv3 and adds one paragraph, section 13, that closes the gap GPL leaves for hosted software. The GNU project describes it exactly that way: AGPLv3 consists of the terms of GPLv3, with an additional paragraph allowing users who interact with the licensed software over a network to receive its source. Choose a License adds the condition in its table: network use is distribution. If a modified version is used to provide a service over a network, the complete source code of the modified version must be made available. The other conditions follow GPLv3: source disclosure, notices, same licence, stated changes, and an express patent grant.
The distinction matters most for startups whose product is a service rather than a shipped program. Under GPLv3 alone, running modified code on your own servers, with users interacting only through a browser or an API, does not count as distributing the code, so no source duty arises. Under AGPLv3, that network interaction itself triggers the duty. That is why the GNU project recommends developers consider AGPL for any software that will commonly be run over a network.
Compatibility notes also apply: AGPLv3 is not compatible with GPLv2, and the GNU project notes it is technically not compatible with GPLv3 in a strict sense either, although separate modules under the two licences may be combined in a single project. Among the open-source licences in this guide, AGPLv3 is the strongest, and the one whose trigger a hosted startup is most likely to misunderstand.
How to Choose Among Open-Source Licences
Choosing among open-source licences is a sequence of four questions, answered in order. First, must modified versions stay open? If no, or if maximum adoption matters more than return of changes, stay with the permissive group: MIT, BSD 3-Clause or Apache 2.0. If yes, move to the copyleft group. Second, how far should the sharing duty reach? One file points to MPL 2.0, one library to LGPLv3, a whole program to GPLv3, and a network service to AGPLv3.
Third, do patents matter for this component? If they do, MIT and BSD 3-Clause drop out, because neither lists an express patent grant, while Apache 2.0 keeps the permissive route open with patent cover. Fourth, where will the code run? Code that will commonly run as a network service needs the AGPLv3 question asked explicitly, even when GPLv3 otherwise looks right.
Two practical checks belong beside those questions. One is the existing codebase: a project that already contains GPLv3 code cannot adopt a permissive licence for the combined work and distribute the result as if the GPLv3 part had vanished. The other is the contributor picture: changing a project’s licence later requires permission from copyright holders, which grows harder with every contributor. A licence chosen casually at the first commit can become effectively permanent. Our guide to self-hosted Git tools shows the same maintenance reality from the other side: running open-source software carries update and governance work, and the licence is only one part of the burden. Choose open-source licences for the project you expect in two years, not only for the repository you have today.

Common Mistakes with Open-Source Licences
The most common mistake with open-source licences is having no licence at all. When a creative work, including code, is made, it is under exclusive copyright by default. Unless a licence specifies otherwise, nobody else can copy, distribute or modify it without risking a claim. Publishing code in a public repository on GitHub does allow other GitHub users to view and fork the repository under the site terms, as Choose a License explains, but that does not grant permission to use, modify or share the software for any purpose. A missing licence is usually an oversight. Until one is added, do not build a product on unlicensed code on the assumption that visibility equals permission.
The second mistake is treating visible code as open-source code. A repository may display source while reserving rights, permitting only non-commercial use, or forbidding a competing hosted use. Each limit can take the licence outside the Open Source Definition. The test is the licence text, read against the Definition, not a public repository or the word open in a marketing page. The third mistake is mixing incompatible licences and discovering it at release: Apache 2.0 with GPLv2-only code, GPLv3 code folded into a closed product, and AGPLv3 code modified for a private hosted service are the recurring forms. Check compatibility when a dependency is added, using the notices in the files themselves.
The fourth mistake is administrative: stripping notices. Every licence in this guide requires notices to be preserved in some form, and Apache 2.0 additionally requires changed files to be marked and NOTICE attributions carried forward. The fifth mistake is assuming a licence covers a name. No licence in this guide grants trademark rights by default, and Apache 2.0 and MPL 2.0 state the exclusion expressly. Record each dependency, its licence and its version, where you record its version number. That inventory is the cheapest licence compliance tool a startup owns.

How to Apply an Open-Source Licence to Your Own Project
Place the full licence text in a file named LICENSE, LICENSE.txt or LICENSE.md in the root of the repository, as GitHub’s licensing guidance recommends. Add a copyright line with the year and the holder’s name where the licence form calls for one, and keep the wording of the licence itself unchanged. For Apache 2.0, follow its appendix: attach the boilerplate notice, with identifying information filled in, in the comment syntax of each file, and include the NOTICE file where one exists. For the GNU licences, include the licence text and the notice the licence specifies, stating the version and whether later versions are permitted. That wording is not decoration: GPL-3.0-only and GPL-3.0-or-later are different permissions, and the file notice records the distinction.
Use the short SPDX identifier for the licence in package metadata, so tools and reviewers can recognise it without reading the full text: MIT, Apache-2.0, BSD-3-Clause, MPL-2.0, GPL-3.0-only or GPL-3.0-or-later, LGPL-3.0-only or LGPL-3.0-or-later, and AGPL-3.0-only or AGPL-3.0-or-later. Keep the identifier consistent with the licence file and the file headers; a mismatch is a common source of confusion in audits. When a project has more than one licence, state the split in the readme and keep each file under the licence its header names. Finally, record the decision: who chose the licence, when, and why. Licence changes need contributor agreement, so the record matters when the project grows beyond its first author.
Frequently Asked Questions About Open-Source Licences
Are open-source licences free to use in a commercial product?
Yes, for all seven open-source licences in this guide. Commercial use is listed as a permission for each of them, and the Open Source Definition forbids discrimination against fields of endeavour. The conditions still apply: notices must be kept, and copyleft licences may require source disclosure on distribution.
Does using open-source code mean I must open-source my whole product?
It depends on the licence, the scope and the trigger. Permissive open-source licences impose no such duty. MPL 2.0 reaches the files it covers, LGPLv3 the library, and GPLv3 and AGPLv3 the whole combined work on distribution, with AGPLv3 also on network use. Private use without distribution triggers none of these duties.
Can I change a project’s licence later?
Only with the agreement of the copyright holders, usually every contributor whose code remains in the project, or a contributor agreement that assigned the necessary rights. Without that agreement, relicensing is not a unilateral act by the current maintainer.
Is code without a licence open source?
No. Code without a licence is under exclusive copyright by default, and others have no general permission to use, modify or share it. Viewing and forking on a code host under the host’s terms does not change that. Ask the maintainers to add a licence, find an alternative under an open-source licence, or negotiate a private licence.
Do open-source licences cover patents and trademarks?
They treat the two separately. Apache 2.0, MPL 2.0, LGPLv3, GPLv3 and AGPLv3 provide an express patent grant from contributors; MIT and BSD 3-Clause do not list one. No licence in this guide grants trademark rights as a matter of course, and Apache 2.0 and MPL 2.0 exclude them expressly.
What is the difference between GPLv3 and AGPLv3 for a hosted startup?
The trigger. GPLv3 duties arise on distribution. AGPLv3 adds network interaction as a trigger, so a modified version offered as a service over a network must make its source available to users who interact with it. A hosted startup using GPLv3 code without distributing it faces no source duty under GPLv3 alone; the same use of AGPLv3 code does create one.
The Bottom Line on Open-Source Licences
Open-source licences are not interchangeable labels. They form a spectrum, from MIT’s single notice condition to AGPLv3’s network source duty, and each step trades adoption against control. Decide the scope first: permissive for maximum reuse, file or library copyleft for components, strong copyleft for whole programs, and AGPLv3 for network services where the author wants network users to hold the source. Then check patents, then check compatibility with code already in the project, then write the choice down in a licence file, headers and metadata that all agree.
The cost of getting open-source licences wrong is rarely a lawsuit on the first day. It is a product that cannot be distributed as built, a dependency replaced late, or a licence change that cannot be made because contributors never agreed to it. The cost of getting them right is a few hours of reading at the start, and a dependency inventory kept current thereafter. For a wider view of the projects these open-source licences govern, see our guide to open-source tools for developers, which records the verified licence of each project it lists rather than assuming it. Choose deliberately, record the choice, and keep the notices intact.
Sources
- Open Source Initiative, OSI Approved Licenses — list of licences complying with the Open Source Definition, including MIT, Apache 2.0, BSD 3-Clause, GPL, LGPL, MPL 2.0 and AGPL.
- Open Source Initiative, The Open Source Definition — the ten criteria a licence must meet, including free redistribution, source code, derived works and no discrimination against fields of endeavour.
- Choose a License, Licenses — permissions, conditions and limitations for AGPLv3, GPLv3, LGPLv3, MPL 2.0, Apache 2.0 and MIT.
- Choose a License, Appendix — reference table of permissions, conditions and limitations for the licences described on the site, including BSD 3-Clause.
- Choose a License, BSD 3-Clause License — the third clause on endorsement and the full licence text.
- Choose a License, Mozilla Public License 2.0 — file-level copyleft, larger works, patent grant and trademark exclusion.
- Choose a License, MIT License — the short permissive licence and its notice condition.
- Choose a License, Apache License 2.0 — patent grant, state-changes condition, NOTICE file and trademark provision.
- Choose a License, No License — default copyright position when no licence is included, and the limited view-and-fork rights under code-host terms.
- GNU Project, Various Licenses and Comments about Them — GNU recommendations and compatibility notes for GPLv3, LGPLv3, AGPLv3, Apache 2.0 and BSD licences.
- SPDX, SPDX License List specification — short identifiers AGPL-3.0-only, AGPL-3.0-or-later, GPL-3.0-or-later, LGPL-3.0-only and LGPL-3.0-or-later.
- GitHub Docs, Licensing a repository — placing a licence file in the repository root and the effect of having no licence.
- BadilHost, Self-Hosted Git in 2026: Gitea vs Forgejo vs GitLab CE Compared — licence positions of self-hosted Git tools, cited for the maintenance and governance context.
- BadilHost, Open-Source Tools for Developers in 2026: 12 Self-Hosted Projects Worth Running — verified licences recorded per project.