What Is a GPL License? Understanding the GNU General Public License
The GPL license — formally called the GNU General Public License — is one of the most widely used software licenses in the world. If you've ever downloaded open-source software, used Linux, or worked with WordPress, you've already interacted with GPL-licensed code. But what does that actually mean, and why does it matter?
The Core Idea Behind GPL
At its heart, the GPL is a free software license created by Richard Stallman and the Free Software Foundation (FSF) in 1989. "Free" here doesn't mean free of charge — it means freedom to use, study, modify, and distribute software.
The GPL guarantees four fundamental freedoms:
- Freedom 0: Run the program for any purpose
- Freedom 1: Study how the program works and modify it
- Freedom 2: Redistribute copies to others
- Freedom 3: Distribute modified versions to others
What makes GPL distinctive is a principle called copyleft. If you take GPL-licensed code and distribute your modified version, your version must also be released under the GPL. The license essentially "travels" with the code.
GPL vs. Other Open-Source Licenses
Not all open-source licenses work the same way. Understanding where GPL sits on the spectrum helps clarify what it does and doesn't allow.
| License | Copyleft | Can Use in Proprietary Software | Must Share Source Code |
|---|---|---|---|
| GPL v2 / v3 | Strong | No | Yes |
| LGPL | Weak/Limited | Yes (with conditions) | Only for LGPL portions |
| MIT | None | Yes | No |
| Apache 2.0 | None | Yes | No |
| AGPL | Strong + Network | No | Yes (including network use) |
MIT and Apache licenses are considered permissive — you can take the code, modify it, and ship it in a closed-source product without releasing your changes. GPL is fundamentally different: it requires that derivative works remain open.
The Two Major Versions: GPLv2 and GPLv3
Most GPL software you encounter runs under either version 2 (GPLv2) or version 3 (GPLv3), released in 2007. The Linux kernel, for example, uses GPLv2. WordPress uses GPLv2 or later.
GPLv3 added protections against:
- Tivoization — hardware that runs GPL software but blocks users from running modified versions
- Patent retaliation — contributors can't sue users over patents related to the software
- Digital rights management (DRM) restrictions that undermine user freedoms
The version matters practically. Code under GPLv2-only cannot be mixed with GPLv3 code without compatibility issues. Many large projects explicitly state "GPLv2 or later" to allow flexibility.
What the GPL Means for Developers 🛠️
If you're a developer, the GPL creates clear obligations depending on how you use the code:
Using GPL software internally (not distributing it) generally requires no action. The obligations kick in when you distribute the software to others — whether commercially or for free.
Distributing GPL software means you must:
- Provide or offer access to the complete corresponding source code
- Include the GPL license text
- Not add restrictions beyond what the GPL already imposes
Building on GPL code for a product is where things get nuanced. If your application incorporates GPL code and you distribute it, your application typically must also be GPL. This is the "viral" or copyleft effect that some developers find restrictive and others see as a feature.
The LGPL (Lesser GPL) exists specifically to allow libraries to be used by non-GPL applications — it's why software like the GNU C Library can be used in proprietary programs without triggering full GPL obligations.
What GPL Means for End Users
If you're simply using GPL software, the license is mostly invisible. You can:
- Run GPL software on any device
- Share copies with others
- Request the source code from whoever distributed it to you
The GPL exists to protect your rights as a user — ensuring that whoever controls the software can't lock you out, remove your ability to modify it, or take away freedoms the license originally granted.
The Variables That Change How GPL Applies
GPL's implications aren't one-size-fits-all. Several factors shape how it affects a given situation:
- Distribution vs. internal use — GPL obligations apply when software is distributed, not just used
- Linking and integration method — how closely your code interacts with GPL code (static linking, dynamic linking, separate processes) influences whether your code must also be GPL; this remains an area of legal interpretation
- Commercial vs. personal use — selling GPL software is allowed, but the source must still be available
- The specific GPL version — v2 and v3 have different compatibility rules with other licenses
- Jurisdiction — while GPL is written to apply broadly, how courts interpret software licenses varies by country
The Spectrum of Use Cases
A solo developer building a personal tool under GPL faces almost no practical burden. A company shipping a product built on GPL libraries needs careful legal review. A SaaS provider running GPL software on servers without distributing it operates in a different space entirely — which is why the AGPL (Affero GPL) was created to close what some call the "SaaS loophole."
Open-source projects like WordPress have built entire ecosystems around GPL, where themes and plugins are expected to carry compatible licenses. Enterprise software companies, by contrast, often deliberately choose MIT or Apache-licensed dependencies to avoid GPL's distribution requirements.
Understanding which scenario matches your own work — whether you're a developer, a business, or someone evaluating software — is what determines how the GPL actually affects you. 📋