Open Source License Types: A Complete Guide
There are hundreds of open source licenses, but a relatively small number account for the vast majority of packages in use. This reference covers every license you are likely to encounter, organized by the obligations they impose. Each entry includes the SPDX identifier, a plain-language summary of what the license requires, and guidance on commercial use.
Permissive Licenses
Maximum freedom, minimal obligations. Safe for commercial use.
Permissive licenses allow you to use, modify, and redistribute the software for any purpose -- including proprietary commercial use -- with minimal conditions. The typical requirement is preserving the original copyright notice and license text. These licenses do not require you to share your source code or license your own work under the same terms.
MITMIT LicenseOSI ApprovedThe most popular open source license. Permits commercial use, modification, distribution, and private use. Requires only that the copyright notice and license text be included in all copies or substantial portions of the software. No warranty, no liability. The MIT license is used by React, jQuery, Rails, .NET, and tens of thousands of npm packages.
- Include copyright notice and license text in distributions
BSD-2-ClauseBSD 2-Clause "Simplified" LicenseOSI ApprovedAlso known as the "FreeBSD License." Functionally identical to MIT -- permits all use with attribution. The only difference from MIT is the wording. Used by FreeBSD, some parts of the Go standard library, and many academic projects.
- Include copyright notice and license text in source and binary distributions
BSD-3-ClauseBSD 3-Clause "New" or "Revised" LicenseOSI ApprovedAdds a "no endorsement" clause to BSD-2-Clause: you cannot use the name of the copyright holder or contributors to endorse or promote products derived from the software without written permission. Used by the original BSD operating system derivatives, Django, and many scientific computing libraries.
- Include copyright notice and license text
- Do not use contributor names for endorsement without permission
ISCISC LicenseOSI ApprovedA simplified version of MIT/BSD written by the Internet Systems Consortium. Functionally equivalent to MIT but with cleaner, more concise language. The ISC license removed the "sublicense" and "sell copies" clauses from MIT because they are considered redundant under copyright law. Used by the ISC BIND DNS server, OpenBSD, and many npm packages.
- Include copyright notice and license text
Apache-2.0Apache License 2.0OSI ApprovedA permissive license with an explicit patent grant. Contributors grant users a royalty-free patent license covering any patents that the contribution necessarily infringes. This provides stronger IP protection than MIT or BSD. However, the patent grant terminates if the user initiates patent litigation against the licensor. Used by Android, Kubernetes, TensorFlow, Apache HTTP Server, and the majority of the Java ecosystem.
- Include license text and NOTICE file
- State changes made to the original files
- Patent grant terminates upon patent litigation against contributors
UnlicenseThe UnlicenseOSI ApprovedA public domain dedication. The author waives all copyright and related rights, placing the work in the public domain worldwide. If public domain dedication is not legally effective in a jurisdiction, the Unlicense grants a permissive license as a fallback. The Unlicense is more aggressive than CC0 in its waiver of moral rights. Some legal scholars question whether a complete waiver of copyright is possible in civil law jurisdictions.
- None -- no conditions of any kind
CC0-1.0Creative Commons Zero v1.0 UniversalA public domain dedication created by Creative Commons. Waives all copyright and neighboring rights to the maximum extent permitted by law. Unlike the Unlicense, CC0 includes a comprehensive fallback license for jurisdictions where public domain dedication is not legally possible. CC0 is preferred for data, documentation, and configuration files rather than software, though it is used by some software projects.
- None -- no conditions of any kind
Weak Copyleft Licenses
Copyleft limited to the licensed component, not your entire application.
Weak copyleft licenses require that modifications to the licensed component itself be shared under the same license, but they do not extend the copyleft obligation to your own code that merely uses the component. The scope of the copyleft varies: LGPL applies at the library level, MPL applies at the file level, and EPL applies at the module level.
LGPL-2.1-onlyGNU Lesser General Public License v2.1OSI ApprovedDesigned specifically for software libraries. If you dynamically link against an LGPL library, your own application code does not need to be released under the LGPL. However, you must: (1) allow users to replace the LGPL library with a modified version, (2) provide the LGPL library's source code, and (3) not impose additional restrictions on the LGPL components. Static linking triggers the full LGPL copyleft requirements, requiring that the user be able to relink the application with a modified version of the library. Used by glibc, GTK 2.x, and many GNU libraries.
- Distribute LGPL library source code
- Allow library replacement (dynamic linking preferred)
- Include license text and copyright notices
- Modifications to LGPL files must be shared under LGPL
LGPL-3.0-onlyGNU Lesser General Public License v3.0OSI ApprovedThe LGPL-3.0 is structured as additional permissions on top of the GPL-3.0. It provides the same library-level copyleft as LGPL-2.1 but adds the GPL-3.0's anti-Tivoization provisions: if you distribute a device that contains LGPL-3.0 software, you must provide the installation information needed to install modified versions of the LGPL library on that device. Used by GCC runtime libraries and some GNOME components.
- All LGPL-2.1 obligations apply
- Provide installation information for consumer devices
- Cannot impose DRM that prevents library replacement
MPL-2.0Mozilla Public License 2.0OSI ApprovedFile-level copyleft. If you modify a file that is under MPL-2.0, you must make the modified source of that specific file available under MPL-2.0. Your own new files can be under any license, including proprietary. This makes MPL-2.0 one of the most commercially friendly copyleft licenses. MPL-2.0 also includes an explicit "Larger Work" provision that allows combining MPL code with proprietary code without the copyleft extending to the proprietary files. Additionally, MPL-2.0 has a built-in compatibility clause with GPL-2.0+, LGPL-2.1+, and AGPL-3.0. Used by Firefox, Terraform (pre-BSL switch), and LibreOffice.
- Modified MPL files must remain under MPL-2.0
- Source code of modified MPL files must be made available
- Include license text
- Your own new files can be under any license
EPL-2.0Eclipse Public License 2.0OSI ApprovedModule-level copyleft used primarily in the Eclipse/Java ecosystem. Modifications to EPL-covered code must be released under EPL-2.0, but your own modules that merely depend on EPL modules remain under your chosen license. EPL-2.0 includes a secondary license clause that allows the original author to designate GPL-2.0+ as an alternative license, enabling combination with GPL projects. Used by Eclipse IDE, Jakarta EE, and many Eclipse Foundation projects.
- Modifications to EPL code must be released under EPL-2.0
- Include license text
- Patent grant included (terminates on patent litigation)
- Your own separate modules can use any license
Strong Copyleft Licenses
Derivative works must be released under the same license.
Strong copyleft licenses require that the entire combined work -- including your proprietary code -- be released under the same copyleft license if you distribute it. The definition of "combined work" and "distribution" varies between licenses, and these definitions are where most compliance complexity lies.
GPL-2.0-onlyGNU General Public License v2.0OSI ApprovedThe license that started the copyleft movement. GPL-2.0 requires that if you distribute a "work based on" GPL code, the entire work must be released under GPL-2.0. "Distribution" means providing copies to others -- using GPL software internally without distributing it does not trigger the copyleft obligation. The key question is what constitutes a "derivative work": static linking clearly creates one, dynamic linking is debated, and separate process communication (via pipes, sockets, or RPC) is generally considered not to create a derivative work. The Linux kernel is the most prominent GPL-2.0 project, and its "syscall exception" explicitly permits userspace programs to use kernel services without becoming derivative works.
- Distribute complete source code of the combined work under GPL-2.0
- Include license text and copyright notices
- Provide source code (or written offer) to anyone who receives a binary
- Cannot impose additional restrictions beyond the GPL
GPL-3.0-onlyGNU General Public License v3.0OSI ApprovedGPL-3.0 adds several provisions beyond GPL-2.0: (1) an explicit patent grant from contributors, (2) anti-Tivoization provisions requiring "Installation Information" for consumer devices, (3) compatibility with Apache-2.0 (resolving a longstanding incompatibility), and (4) stronger protections against DRM restrictions. The anti-Tivoization clause is the most controversial addition -- it requires that if you distribute GPL-3.0 software on a device, you must provide the keys and instructions needed to install modified versions. This is why the Linux kernel remains GPL-2.0 only: Linus Torvalds has publicly rejected GPL-3.0 because of this provision. Used by GCC, GIMP, Bash, and many GNU utilities.
- All GPL-2.0 obligations apply
- Provide installation information for consumer devices
- Explicit patent grant (terminates on patent litigation)
- Cannot impose DRM that restricts users from running modified versions
Network Copyleft
SaaS and network use triggers source disclosure.
The GPL's copyleft is triggered by "distribution" -- providing copies of the software to others. Running GPL software on your own servers to provide a web service is not distribution, so SaaS companies can use GPL code without disclosing their source. Network copyleft licenses close this gap.
AGPL-3.0-onlyGNU Affero General Public License v3.0OSI ApprovedThe AGPL-3.0 is the GPL-3.0 with one additional clause (Section 13): if you run a modified version of the software on a server and users interact with it over a network, you must provide the source code to those users. "Interact remotely through a computer network" includes any interaction via HTTP, WebSocket, gRPC, or any other protocol. This means that SaaS providers using AGPL-3.0 components must release the source code of their entire application -- not just the AGPL component, but the complete combined work. Major companies including Google have banned AGPL internally. Used by MongoDB (before the SSPL switch), Grafana, and Nextcloud.
- All GPL-3.0 obligations apply
- Network users must be offered source code access
- Source must be available via a prominently displayed download link
- Applies to the entire combined work, not just the AGPL component
Source-Available Licenses
Source code is visible but commercial use is restricted. Not OSI-approved.
Source-available licenses make the source code publicly readable but impose restrictions that disqualify them from the Open Source Definition maintained by the Open Source Initiative. These licenses typically restrict competing commercial use while allowing most other uses. They are increasingly common among venture-backed companies that want community contributions without allowing cloud providers to resell hosted versions.
SSPL-1.0Server Side Public License v1Created by MongoDB in 2018 after Amazon launched DocumentDB as a managed MongoDB-compatible service. The SSPL is based on AGPL-3.0 but extends the network copyleft to cover the entire "service" -- if you offer the SSPL software as a service, you must release the source code of your entire service stack, including management software, backup systems, monitoring tools, and deployment automation. The OSI rejected the SSPL as not meeting the Open Source Definition because of this extreme breadth. MongoDB, Graylog, and some Elastic products use the SSPL.
- All AGPL-3.0 obligations apply
- If offered as a service, must release source code of the entire service stack
- Service stack includes management, monitoring, deployment, and backup tooling
- Not OSI-approved -- not considered open source
BSL-1.1Business Source License 1.1A time-delayed open source license created by MariaDB. Software under BSL-1.1 is source-available with restrictions on production use for a specified period (the "change date"), after which it automatically converts to an open source license (the "change license," typically GPL-2.0 or Apache-2.0). The "Additional Use Grant" field specifies which production uses are allowed before the change date -- for example, HashiCorp allows non-competing use. BSL-1.1 is used by HashiCorp (Terraform, Vault, Consul), MariaDB MaxScale, Sentry, and CockroachDB.
- Production use may be restricted until the change date
- Read the Additional Use Grant carefully for each project
- After the change date, the change license applies with its standard obligations
- Not OSI-approved during the restricted period
Elastic-2.0Elastic License 2.0Created by Elastic for Elasticsearch and Kibana after their SSPL adoption was met with community pushback. ELv2 is simpler than SSPL: you can use, copy, and modify the software for any purpose except (1) providing it as a managed service, and (2) circumventing license key functionality. There is no copyleft component -- you do not need to share your modifications. This makes it more commercially practical than SSPL for organizations that are not competing with Elastic's cloud offering.
- Cannot provide the software as a managed service to third parties
- Cannot circumvent license key or security functionality
- No source code disclosure requirement for modifications
- Not OSI-approved
License Compatibility Matrix
Which licenses can coexist in the same project.
Two licenses are "compatible" if code under both licenses can be combined into a single work without violating either license's terms. Compatibility is not always symmetric -- MIT code can be included in a GPL project (the result is GPL), but GPL code cannot be included in an MIT project (because MIT does not satisfy GPL's copyleft requirement).
The following table summarizes the most common compatibility relationships. A checkmark means code under the row license can be incorporated into a project under the column license.
| Into → | MIT | Apache-2.0 | LGPL-2.1 | MPL-2.0 | GPL-2.0 | GPL-3.0 | AGPL-3.0 |
|---|---|---|---|---|---|---|---|
| MIT | Y | Y | Y | Y | Y | Y | Y |
| Apache-2.0 | N | Y | N | Y | N | Y | Y |
| LGPL-2.1 | N | N | Y | N | Y | Y | Y |
| MPL-2.0 | N | N | N | Y | Y | Y | Y |
| GPL-2.0 | N | N | N | N | Y | N | N |
| GPL-3.0 | N | N | N | N | N | Y | Y |
| AGPL-3.0 | N | N | N | N | N | N | Y |
Notes: Apache-2.0 is compatible with GPL-3.0 but not GPL-2.0 due to the patent retaliation clause. GPL-2.0 is only compatible with GPL-3.0 if the code uses the "or later" clause (GPL-2.0+). MPL-2.0 includes an explicit compatibility provision for GPL-2.0+, LGPL-2.1+, and AGPL-3.0. This table assumes the "only" version of each license (no "or later" clause).
SPDX License Identifiers
The standard way to reference licenses in SBOMs, package metadata, and scanning tools.
SPDX (Software Package Data Exchange) is an ISO/IEC 5962:2021 standard maintained by the Linux Foundation. SPDX license identifiers provide a standardized, unambiguous way to refer to licenses. Instead of writing "the MIT license" or "MIT License (Expat)" or "MIT/X11", you write MIT.
Simple identifiers
A single SPDX identifier refers to exactly one license: MIT, Apache-2.0, GPL-3.0-only. The full list of recognized identifiers is maintained at spdx.org/licenses.
Compound expressions
SPDX expressions can combine licenses using operators:
MIT OR Apache-2.0-- Dual-licensed. The user can choose either license. This is common in the Rust ecosystem.LGPL-2.1-only AND MIT-- Both licenses apply simultaneously. The user must comply with the terms of both.GPL-2.0-only WITH Classpath-exception-2.0-- A license with an exception. The Classpath exception allows linking GPL code with non-GPL code without the copyleft extending to the non-GPL code. Used by OpenJDK.
The "-only" and "-or-later" suffixes
GPL family licenses use suffixes to indicate version scope: GPL-2.0-only means exactly version 2.0 of the GPL. GPL-2.0-or-later means version 2.0 or any subsequent version published by the FSF. The "or later" clause is significant for compatibility -- code under GPL-2.0-or-later can be combined with GPL-3.0 code, but code under GPL-2.0-only cannot.
ScanRook normalizes all detected licenses to their SPDX identifiers, including converting ecosystem-specific names (like Fedora's "ASL 2.0" for Apache-2.0 or PyPI's "License :: OSI Approved :: MIT License") to the canonical SPDX form. This normalization ensures consistent policy evaluation across all ecosystems. For more on how ScanRook detects and classifies licenses, see the License Scanning documentation.
Further reading
Related guides and external resources.
- License Scanning and Compliance -- How ScanRook detects licenses and enforces policies.
- The Complete Guide to Open Source License Compliance -- Building a compliance program from scratch.
- OSI Approved Licenses -- The official list of licenses approved by the Open Source Initiative.
- FSF License List -- The Free Software Foundation's analysis of license compatibility with the GPL.
- choosealicense.com -- GitHub's plain-language license comparison tool.