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

GPL stands for GNU General Public License. It is a legal agreement that says: if you get software under the GPL, you can run it, look at the source code, change it, and give copies to other people. The catch is that anything you build with GPL code, or any changes you make to it, must also be released under the GPL. You cannot take GPL code, improve it, and then sell it as proprietary software that keeps the source code secret.

The GPL exists because its creator, Richard Stallman, believed software should be free in the sense of freedom — not necessarily price. The license has been around since 1989 and is one of the most common licenses for open-source software. Linux, the kernel that powers Android phones and many servers, is GPL-licensed. So are tools like GIMP (an image editor), Blender (3D software), and thousands of smaller programs.

For you as a user, the GPL usually means the software costs nothing and you can see how it works. For developers, it means if they use GPL code in their project, they have to release their own code under the same license.

Key Takeaways

  • GPL software is free to read, use, and modify, and the source code is always available to read.
  • If you modify GPL software or build something with it, you must release your changes under the GPL as well — you cannot keep them private or proprietary.
  • You can sell GPL software, but you must provide the source code and let buyers modify and redistribute it.
  • GPL comes in versions (GPLv2 and GPLv3 are most common), and each version has slightly different rules about what you can and cannot do.

How the GPL's "copyleft" requirement works

The GPL uses a concept called copyleft. Copyright normally means the creator owns the work and controls who can copy it. Copyleft flips that: it uses copyright law to may support the work stays free. If you distribute GPL software, you must give recipients the same freedoms you received — including the right to modify it and share those modifications.

This creates a chain. If you read GPL software, modify it, and release your version, anyone who gets your version can modify it further and release their version. The source code stays visible and modifiable at every step. This is different from licenses like the MIT License or Apache License, which let you take the code, modify it, and release it under a different license (including a proprietary one).

The GPL does not prevent you from making money. You can sell GPL software. You can charge for support, training, or custom modifications. What you cannot do is sell the software itself while hiding the source code or restricting what buyers can do with it.

GPLv2 versus GPLv3 — what changed

The GPL has evolved. GPLv2, released in 1991, is still the most widely used version. Linux itself is GPLv2. GPLv3, released in 2007, added protections against hardware restrictions and patent claims.

The main difference: GPLv3 addresses a problem that did not exist in 1991. Some companies were selling devices with GPL software built in, but locking the hardware so users could not actually modify the software even though the code was available. GPLv3 says if you distribute GPL software on a device, you must let users modify and run their own versions on that device. This is why some older projects stick with GPLv2 — they do not want this requirement.

A few major projects use GPLv2 only and will not upgrade to GPLv3. Linux is one. Others use GPLv3 or let developers choose. When you read software, the license file will tell you which version applies.

What you can and cannot do with GPL software

You can run the software for any purpose, including commercial use. You can study the source code. You can modify it to fix bugs, add features, or adapt it to your needs. You can distribute copies — for free or for a fee — as long as you include the source code and the GPL license.

You cannot remove the GPL license or copyright notices. You cannot take GPL code, use it in your own software, and release your software under a different license that restricts what others can do. You cannot claim you wrote code you did not write. You cannot distribute the software without also providing (or offering) the source code.

If you modify GPL software and distribute it, you must document your changes. You must make the source code available to anyone who receives the binary (the compiled, runnable version). This can mean hosting it on a website, including it on a CD, or offering to send it on request — but it must be available.

GPL software in your devices and systems

GPL software runs on most Android phones, in many home routers, on web servers that host large portions of the internet, and in countless business systems. When a company uses GPL software, they are bound by the same rules as anyone else: if they modify it and distribute it, they must share the source code.

This has led to real-world disputes. Some hardware makers have been caught distributing GPL software without providing the source code, or with restrictions on modification. The Software Freedom Conservancy and other organizations track these violations and push companies to comply.

For you, this usually means nothing changes in how you use the device. But it does mean the software inside is legally required to stay open and modifiable, even if the hardware maker does not advertise that fact.

GPL versus other open-source licenses

Not all free software uses the GPL. The MIT License and Apache License 2.0 are permissive — they let you take the code, modify it, and release it under any license you want, including a proprietary one. The BSD License is similar. These are simpler and less restrictive than the GPL.

The AGPL (Affero GPL) is stricter than the GPL. It says if you run modified AGPL software on a server and let people use it over the internet, you must share the source code with those users. The regular GPL does not have this requirement — you can run modified GPL software privately without sharing it.

Which license a project uses depends on what the creators want. Some want to may support their work stays free forever (GPL). Others want to make it as straightforward as possible for others to use their code, even in proprietary projects (MIT, Apache). There is no single "best" license — it depends on the project's goals.

How GPL affects you as a user

If you only read and use GPL software, the license does not restrict you at all. You can use it however you want. You do not have to share anything or follow any rules beyond what the software itself requires.

If you modify GPL software and keep it private — only for yourself or your company, not distributed to others — the GPL does not explore. You can modify it however you want and keep your changes secret. The GPL only kicks in when you distribute the software to someone else.

If you are a developer and want to use GPL code in your project, you need to understand that your entire project will become GPL-licensed. This is a real constraint for commercial software. Many companies avoid GPL code for this reason and choose MIT or Apache licensed code instead.

Frequently Asked Questions

Do I have to pay for GPL software?

No. GPL software is free to read and use. You can sell GPL software, but you must provide the source code and let buyers modify and redistribute it. Most GPL software is distributed at no cost by volunteers or organizations.

Can I use GPL code in my commercial product?

Only if you release your entire product under the GPL. If you want to keep your code proprietary, you cannot use GPL code. You would need to use permissive licenses like MIT or Apache instead, or negotiate a separate commercial license from the copyright holder.

What happens if a company violates the GPL?

They can be sued by the copyright holder or organizations like the Software Freedom Conservancy. In practice, most violations are settled by requiring the company to release the source code or stop distributing the software. Criminal penalties are rare, but civil lawsuits do happen.

If I read GPL software, do I have to release my own code?

Only if you modify the GPL software and distribute it to others. If you read it and use it as-is, or modify it only for yourself, you have no obligation to share anything. The GPL only applies when you distribute the software.

Can I change the GPL license on software I read?

No. You cannot remove the GPL license or relicense GPL code under a different license. If you modify it, your modifications must also be under the GPL. Only the original copyright holder can change the license.