The GPL is a free software license that lets you use, modify, and share code — but requires you to share your changes under the same terms
The GNU General Public License (GPL) is a legal agreement that governs how you can use and distribute software. When software carries a GPL license, it means the original author has given you permission to run the program, look at its source code, change it, and share it with others. The catch: if you distribute a modified version, you must release your changes under the GPL as well. This requirement is sometimes called "copyleft" — it ensures the software stays free and open for everyone downstream.
The GPL exists in three main versions: GPLv2 (released in 1991), GPLv3 (2007), and the Affero GPL (AGPL), which extends the same rules to software run on servers. Most GPL software you encounter uses either v2 or v3. The differences matter mainly if you're modifying and redistributing code; for everyday use, you're simply running the software without restriction.
Key Takeaways
- GPL software is free to download, use, and modify without paying anyone or asking permission.
- If you distribute modified GPL software to others, you must release your changes under the GPL as well.
- You can use GPL software in a business or commercial product, but you cannot make it proprietary or closed-source.
- The GPL does not require you to share changes you make for your own use — only changes you distribute to others.
- Many widely used programs run under the GPL, including Linux, WordPress, GIMP, and Firefox.
How the GPL differs from other software licenses
Not all free software uses the GPL. Some licenses, like the MIT License or Apache 2.0, let you take code, modify it, and release it under a different license — even a proprietary one. The GPL forbids that. Once code is GPL, it stays GPL in every version you create from it. This is the defining difference: GPL is "viral" in the sense that the license spreads to derivative works.
Other licenses like the BSD License are permissive but less restrictive than GPL. You can use BSD code in closed-source software without releasing your changes. GPL does not allow that. If you incorporate GPL code into your program, your entire program must be GPL. This makes GPL stricter about keeping software open, but it also means GPL authors give up more control over how their work is used.
What you can and cannot do with GPL software
You can run GPL software for any purpose — personal, educational, or commercial — without paying or asking permission. You can download the source code, read it, and understand how the program works. You can modify it to fix bugs, add features, or adapt it to your needs. You can make copies and give them to friends, colleagues, or customers.
What you cannot do is distribute a modified version without releasing your source code under the GPL. If you change GPL software and sell it, give it away, or run it on a server that serves others, you must make your changes available under the same license. You also cannot take GPL code, add it to a proprietary program, and sell the result as closed-source software. The GPL prevents that.
One important exception: if you modify GPL software only for your own use and never distribute it, you do not have to share your changes. You can run a customized version of Linux on your own server, modify WordPress for your own website, or alter GIMP for personal projects without releasing anything. The GPL obligation kicks in only when you distribute.
Common GPL software you may already use
Linux, the operating system kernel, is GPL. That means Android phones, web servers, and many cloud services run on GPL code. WordPress, the platform behind roughly 40 percent of websites, is GPL. GIMP, a free image editor, is GPL. VLC media player, Firefox, and Blender are all GPL or use GPL-compatible licenses. If you use any of these, you are already benefiting from GPL software.
Many companies build products around GPL software. Red Hat sells support and services for Linux. Automattic runs WordPress.com on top of WordPress. These companies do not violate the GPL — they are using and distributing GPL software correctly. They make money through services, support, hosting, or proprietary add-ons, not by closing the source code.
What happens if someone violates the GPL
If a company takes GPL code, modifies it, and distributes it without releasing the source code, they are violating the license. The original author or copyright holder can take legal action to stop the violation and force the company to release the code. This has happened: in 2007, Cisco settled a lawsuit over GPL violations in its routers by releasing the source code. In 2021, a German court ruled that a company must stop selling a product that incorporated GPL code without releasing modifications.
The GPL is enforceable in court, though enforcement is usually the responsibility of the original author or a foundation that holds the copyright. Most GPL violations are resolved through negotiation rather than litigation — once a company realizes it is in violation, they usually comply rather than face a lawsuit.
GPL versions and what changed between them
GPLv2, released in 1991, is the most widely used version. It is simple and straightforward: share your changes if you distribute the software. GPLv3, released in 2007, added protections against patent claims and restrictions on hardware modification. If a company patents something related to GPL software, GPLv3 requires them to grant users a patent license as well. GPLv3 also prevents manufacturers from locking down hardware so you cannot run modified software on it.
Some projects use GPLv2 only and refuse to upgrade to v3. Others use v3 exclusively. A few use "v2 or later," which means you can choose which version to follow. The Affero GPL (AGPL) extends the copyleft requirement to software run on servers: if you run AGPL software and modify it to serve users over the internet, you must release your changes even if you never distribute the code directly.
Using GPL software in your own projects
If you want to use GPL code in your own software, you have two main paths. First, you can release your entire project under the GPL. Your code becomes GPL, and anyone can use, modify, and redistribute it under the same terms. This is common in open-source projects. Second, you can use GPL libraries or components in a proprietary program only if the license allows it — but standard GPL does not. If you incorporate GPL code, your program must be GPL.
Some GPL software is available under a dual license, meaning the author offers it under both GPL and a commercial license. You can choose: use it under GPL for free, or pay for a commercial license that lets you incorporate it into proprietary software. This is how some companies fund open-source development. Before using GPL code in a commercial product, check whether a dual-license option exists.
Frequently Asked Questions
Can I use GPL software in a business or commercial product?
Yes, you can use GPL software in a business. You can sell products that include GPL software, offer services based on it, or run it on servers. The restriction is not on commercial use — it is on distribution. If you distribute the software (sell it, give it away, or run it on a server others access), you must release your modifications under the GPL.
Do I have to release my changes if I only use GPL software internally?
No. The GPL requires you to share changes only when you distribute the software to others. If you modify GPL software and run it only on your own servers or computers, you do not have to release your changes. The obligation begins when you distribute — whether you sell it, give it away, or make it available to external users.
Can I use GPL code in a closed-source program?
Not without permission from the copyright holder. If you incorporate GPL code into a proprietary program and distribute it, you are violating the license. Your only options are to release your entire program under the GPL, use a different non-GPL library, or obtain a commercial license from the author if one exists.
What is the difference between GPL and open-source?
Open-source is a broad category of licenses that make source code available. GPL is one type of open-source license, but not all open-source licenses are GPL. MIT, Apache, and BSD licenses are open-source but more permissive than GPL. GPL is stricter because it requires derivative works to stay open-source as well.
If I download GPL software, do I have to release my own code?
Only if you modify the GPL software and distribute it. Simply downloading and using GPL software does not obligate you to release anything. You can run GPL software on your computer or server without sharing your own code. The obligation applies only to modifications you distribute to others.