Can I use GPL-2.0 code commercially?
Last updated
TL;DR: Selling or shipping a program with GPL-2.0 code: Yes. Running it as an online service without distributing it: Yes. GPL-2.0 allows commercial use and sale; anyone you distribute the program to must get the complete source under GPL-2.0.
Is selling or shipping a program with GPL-2.0 code allowed under GNU General Public License v2.0 only?
Yes. Every use you described is granted by GPL 2.0, and nothing you described is prohibited.
License: GNU General Public License v2.0 only (GPL-2.0-only, curated)
Duties: attribution, license_notice, state_changes, share_alike, source_disclosure
Is running it as an online service without distributing it allowed under GNU General Public License v2.0 only?
Yes. Every use you described is granted by GPL 2.0, and nothing you described is prohibited.
License: GNU General Public License v2.0 only (GPL-2.0-only, curated)
Duties: attribution, license_notice, state_changes, share_alike, source_disclosure
What else should I know?
- GPL-2.0 conditions attach to distribution; a hosted service that never ships the program does not trigger them (AGPL-3.0 closes that gap, GPL-2.0 does not).
- GPL-2.0-only code cannot be combined with Apache-2.0 code in one program; GPL-2.0-or-later can, by moving to GPL-3.0.
What are the sources?
How can I check it myself (free, no key)?
{
"tool": "check_license",
"arguments": {
"license": "GPL-2.0-only",
"intended_use": {
"commercial_use": true,
"redistribution": true
}
}
}Computed from a2ally's license profiles; not legal advice. JSON · Markdown
Get a free API key in one call
No card and no email needed. 100 free credits; the license and policy checks stay free without a key.
curl -s -X POST https://www.a2ally.com/v1/accounts/signup -H "Content-Type: application/json" -d '{"accept_terms":true}'
export A2ALLY_API_KEY=rs_... # the api_key from the reply (shown once)
curl -s https://www.a2ally.com/v1/licenses/check -H "Authorization: Bearer $A2ALLY_API_KEY" \
-H "Content-Type: application/json" -d '{"license":"MIT","intended_use":{"commercial_use":true}}'
