Skip to main content Skip to sidebar

Open Source Licenses Comparison

Choosing the right open source license is a critical decision that affects how your code can be used, modified, and distributed. Whether you’re releasing a new project or evaluating dependencies for commercial software, understanding license differences helps avoid legal issues and align with your goals. This article provides a comprehensive comparison of major open source licenses, covering legal implications, practical considerations, and business perspectives.

Quick Reference Matrix

Permissions and Conditions

LicenseTypeCommercial UseModificationDistributionPrivate UseSublicense
MITPermissiveYesYesYesYesYes
Apache 2.0PermissiveYesYesYesYesYes
BSD 2-ClausePermissiveYesYesYesYesYes
BSD 3-ClausePermissiveYesYesYesYesYes
GPL-2.0Strong CopyleftYesYesYesYesYes (same terms)
GPL-3.0Strong CopyleftYesYesYesYesYes (same terms)
LGPL-3.0Weak CopyleftYesYesYesYesYes (same terms)
AGPL-3.0Strong CopyleftYesYesYesYesYes (same terms)
MPL-2.0Weak CopyleftYesYesYesYesYes

Requirements and Restrictions

LicenseInclude LicenseCopyright NoticeState ChangesDisclose SourceSame LicenseNetwork Clause
MITYesYesNoNoNoNo
Apache 2.0YesYesYesNoNoNo
BSD 2-ClauseYesYesNoNoNoNo
BSD 3-ClauseYesYesNoNoNoNo
GPL-2.0YesYesYesYesYesNo
GPL-3.0YesYesYesYesYesNo
LGPL-3.0YesYesYesLibrary onlyLibrary onlyNo
AGPL-3.0YesYesYesYesYesYes
MPL-2.0YesYesYesModified filesModified filesNo

Patent and Trademark Rights

LicensePatent GrantPatent RetaliationTrademark Grant
MITNoNoNo
Apache 2.0YesYesNo (explicit)
BSD 2-ClauseNoNoNo
BSD 3-ClauseNoNoNo (endorsement clause)
GPL-2.0ImplicitNoNo
GPL-3.0YesYesNo
LGPL-3.0YesYesNo
AGPL-3.0YesYesNo
MPL-2.0YesYesNo

Compatibility Matrix

LicenseGPL-2.0 CompatibleGPL-3.0 CompatibleProprietary Compatible
MITYesYesYes
Apache 2.0NoYesYes
BSD 2-ClauseYesYesYes
BSD 3-ClauseYesYesYes
GPL-2.0YesNo (one-way)No
GPL-3.0No (one-way)YesNo
LGPL-3.0Yes (linking)YesYes (linking)
AGPL-3.0NoYesNo
MPL-2.0Secondary licenseYesYes (new files)

Use in Proprietary Projects

LicenseCan Link/UseSource Disclosure RequiredNotes
MITYesNoInclude license file
Apache 2.0YesNoInclude license + NOTICE
BSD 2-ClauseYesNoInclude license file
BSD 3-ClauseYesNoInclude license, no endorsement
GPL-2.0NoEntire projectCannot link without open sourcing
GPL-3.0NoEntire projectCannot link without open sourcing
LGPL-3.0Yes (dynamic)Library modificationsAllow library replacement
AGPL-3.0NoEntire project + networkSaaS must disclose source
MPL-2.0YesModified MPL files onlyFile-level copyleft

License Categories

Open source licenses fall into two main categories based on how they treat derivative works.

Permissive Licenses

Permissive licenses impose minimal restrictions on how software can be used, modified, and redistributed. They allow proprietary derivatives and commercial use with few obligations.

Common permissive licenses:

  • MIT License
  • Apache License 2.0
  • BSD 2-Clause (Simplified)
  • BSD 3-Clause (New BSD)
  • ISC License

Copyleft Licenses

Copyleft licenses require derivative works to be distributed under the same or compatible license terms. They ensure modifications remain open source.

Common copyleft licenses:

  • GNU General Public License v2 (GPL-2.0)
  • GNU General Public License v3 (GPL-3.0)
  • GNU Lesser General Public License (LGPL)
  • GNU Affero General Public License (AGPL)
  • Mozilla Public License 2.0 (MPL-2.0)

Permissive Licenses in Detail

MIT License

Most popular open source license due to simplicity. Permits use, copy, modify, merge, publish, distribute, sublicense, and sell. Only requirement: include copyright notice and license text. Compatible with almost all other licenses.

Apache License 2.0

Similar to MIT but adds explicit patent grants and trademark protection. Contributors grant patent licenses, modified files must state changes, and NOTICE files must be preserved. Better for enterprise adoption due to clear patent and trademark boundaries.

AspectMITApache 2.0
Patent grantImplicit/noneExplicit grant
Trademark rightsNot addressedExplicitly excluded
State changesNot requiredRequired for modified files
NOTICE fileNot applicableMust preserve if present

BSD Licenses

BSD licenses come in several variants. BSD 2-Clause requires copyright notice in source and binary distributions. BSD 3-Clause adds prohibition on using project name for endorsement. BSD 4-Clause (rarely used) requires advertising to mention the project, causing GPL incompatibility.

ClauseBSD 2-ClauseBSD 3-ClauseBSD 4-Clause
Copyright noticeRequiredRequiredRequired
No endorsementNoYesYes
AdvertisingNoNoYes
GPL compatibleYesYesNo

Copyleft Licenses in Detail

GNU General Public License (GPL)

GPL-2.0 is a strong copyleft license requiring derivative works to be licensed under GPL-2.0. Source code must be provided, and all modifications must be open sourced. Cannot use in proprietary software as linked library. No explicit patent license.

GPL-3.0 updated GPL-2.0 with explicit patent provisions, anti-tivoization measures (prevents hardware lockdown of GPL software), and better internationalization. More compatible with Apache 2.0. Some projects (Linux kernel) stayed on v2 due to anti-tivoization clause.

AspectGPL-2.0GPL-3.0
Patent grantImplicitExplicit
TivoizationNot addressedProhibited
DRM restrictionsNot addressedAnti-circumvention
TerminationPermanentAutomatic reinstatement

GNU Lesser General Public License (LGPL)

Weaker copyleft that allows linking from proprietary software. Library modifications must be licensed under LGPL, but combined work can be proprietary. Must allow users to replace the LGPL library. Good for libraries wanting wider adoption while ensuring modifications are shared back.

GNU Affero General Public License (AGPL)

Extends GPL-3.0 to require source distribution when software is used to provide a network service. Closes the “SaaS loophole” in GPL by requiring SaaS providers to share modifications. Often avoided by commercial SaaS companies.

Mozilla Public License 2.0 (MPL-2.0)

File-level copyleft: only modified MPL files must remain open source. New files can use any license. Balanced between permissive and copyleft with explicit patent grant. Easier commercial adoption than GPL.

AspectGPL-3.0LGPLMPL-2.0
ScopeEntire derivativeLibrary boundaryFile-level
Proprietary combinationNoLinking onlyYes (new files)
ComplexityHighMediumLow

Practical Guidance

Choosing a License for Your Project

LicenseBest ForKey Benefit
MIT / BSDLibraries, tools, maximum adoptionSimple terms, proprietary forks allowed
Apache 2.0Enterprise software, patent-sensitive projectsExplicit patent grant, clear trademark boundaries
GPLApplications requiring open derivativesPrevents proprietary forks, strong community
LGPLLibraries wanting commercial adoptionProprietary linking allowed, modifications shared
AGPLSaaS applicationsCloses network loophole, encourages commercial licensing
MPL-2.0Balance between permissive and copyleftFile-level copyleft, proprietary additions allowed

Dual Licensing Strategy

Dual licensing offers open source version under GPL/AGPL while selling commercial licenses for proprietary use. Requires Contributor License Agreements (CLAs) to ensure contributors grant rights for both licenses.