esdecode

GPL-3.0 vs LGPL-3.0 License

GNU General Public License v3.0 compared with GNU Lesser General Public License v3.0: what each licence allows, and whether code under one can be used in a project under the other. Results are generated by the open-source license compatibility checker.

Quick Answer

Compatibility is directional, so both directions are answered separately (distributed software):

GPL-3.0 code in a project licensed under LGPL-3.0

Potential Conflict

Using GPL-3.0-licensed code in a project under LGPL-3.0 may conflict, depending on how the code is combined, distributed and licensed.

Using GPL-3.0 code in a project under LGPL-3.0 is one-directional: LGPL-3.0 code can go into a work under GPL-3.0, but a distributed work containing GPL-3.0 code must as a whole be licensed under GPL-3.0. Your own files may keep LGPL-3.0, yet the project can no longer be distributed under LGPL-3.0 alone.

LGPL-3.0 code in a project licensed under GPL-3.0

Compatible With Conditions

Using LGPL-3.0-licensed code in a project under GPL-3.0 is generally possible if the listed conditions are met.

LGPL-3.0 permits its code to be used under the terms of the GPL, so it can be combined into a work distributed under GPL-3.0.

Key Differences

  • Copyleft: GPL-3.0: strong; LGPL-3.0: weak (library / module level).
  • Source disclosure: GPL-3.0: whole distributed work based on it; LGPL-3.0: the library and changes to it.

Comparison Table

GPL-3.0LGPL-3.0
TypeOpen sourceOpen source
OSI approvedYesYes
Commercial usePermittedPermitted
ModificationPermittedPermitted
DistributionPermittedPermitted
CopyleftStrongWeak (library / module level)
Network-use (SaaS) clauseNoNo
Source disclosureWhole distributed work based on itThe library and changes to it
Same licence for distributed changesYesYes
Attribution / noticesYesYes
Mark modified filesYesYes
Express patent licenceYesYes
Patent termination clauseYesYes
Trademark rights grantedNot addressedNot addressed

Commercial Use

  • GPL-3.0: permitted.
  • LGPL-3.0: permitted.
  • GPL-3.0 code in a project licensed under LGPL-3.0: GPL-3.0 permits commercial use. Commercial use, including selling copies, is allowed; the copyleft conditions still apply to how the code is distributed.
  • LGPL-3.0 code in a project licensed under GPL-3.0: LGPL-3.0 permits commercial use. Commercial use, including selling copies, is allowed; the copyleft conditions still apply to how the code is distributed.

Proprietary Software

GPL-3.0 code in closed-source commercial software

Likely Incompatible

Using GPL-3.0-licensed code in a proprietary project is likely incompatible in this scenario, as the licence terms are generally understood.

If a work based on GPL-3.0 code is distributed, the whole work must be licensed under GPL-3.0 with its complete source available. That is generally incompatible with distributing the project under proprietary terms.

LGPL-3.0 code in closed-source commercial software

Compatible With Conditions

Using LGPL-3.0-licensed code in a proprietary project is generally possible if the listed conditions are met.

An application that uses an LGPL-3.0 library may be distributed under its own terms, including proprietary terms, when section 4 is met: typically by using the library as a replaceable shared library, giving notice of its use, and including the licence.

  • GPL-3.0 code in closed-source commercial software: If a work based on GPL-3.0 code is distributed, the whole work must be licensed under GPL-3.0 with its complete source available. That is generally incompatible with distributing the project under proprietary terms.
  • LGPL-3.0 code in closed-source commercial software: An application that uses an LGPL-3.0 library may be distributed under its own terms, including proprietary terms, when section 4 is met: typically by using the library as a replaceable shared library, giving notice of its use, and including the licence.

SaaS

  • Network-use clause: GPL-3.0: no; LGPL-3.0: no.

GPL-3.0 code in a closed-source SaaS

Compatible With Conditions

Using GPL-3.0-licensed code in a proprietary project is generally possible if the listed conditions are met.

GPL-3.0 has no network-use clause: running GPL-3.0 code on your servers to provide a service, without distributing it, generally does not require releasing source. This depends on the code not being distributed.

LGPL-3.0 code in a closed-source SaaS

Generally Compatible

Using LGPL-3.0-licensed code in a proprietary project is generally compatible in this scenario.

LGPL-3.0 copyleft conditions are triggered by distribution; this scenario does not include distribution.

  • GPL-3.0 code in a closed-source SaaS: GPL-3.0 has no network-use clause: running GPL-3.0 code on your servers to provide a service, without distributing it, generally does not require releasing source. This depends on the code not being distributed.
  • LGPL-3.0 code in a closed-source SaaS: LGPL-3.0 has no network-use (SaaS) clause.

Modification

  • GPL-3.0: permitted; modified files must be marked.
  • LGPL-3.0: permitted; modified files must be marked.

Modifying GPL-3.0 code used in closed-source software

Likely Incompatible

Using GPL-3.0-licensed code in a proprietary project is likely incompatible in this scenario, as the licence terms are generally understood.

If a work based on GPL-3.0 code is distributed, the whole work must be licensed under GPL-3.0 with its complete source available. That is generally incompatible with distributing the project under proprietary terms.

Modifying LGPL-3.0 code used in closed-source software

Compatible With Conditions

Using LGPL-3.0-licensed code in a proprietary project is generally possible if the listed conditions are met.

An application that uses an LGPL-3.0 library may be distributed under its own terms, including proprietary terms, when section 4 is met: typically by using the library as a replaceable shared library, giving notice of its use, and including the licence.

  • Modifying GPL-3.0 code used in closed-source software: GPL-3.0 permits modification. GPL-3.0 requires modified files to carry notices stating that they were changed.
  • Modifying LGPL-3.0 code used in closed-source software: LGPL-3.0 permits modification. LGPL-3.0 requires modified files to carry notices stating that they were changed.

Distribution

  • GPL-3.0: permitted.
  • LGPL-3.0: permitted.
  • GPL-3.0 code in a project licensed under LGPL-3.0: Using GPL-3.0 code in a project under LGPL-3.0 is one-directional: LGPL-3.0 code can go into a work under GPL-3.0, but a distributed work containing GPL-3.0 code must as a whole be licensed under GPL-3.0. Your own files may keep LGPL-3.0, yet the project can no longer be distributed under LGPL-3.0 alone.
  • LGPL-3.0 code in a project licensed under GPL-3.0: LGPL-3.0 permits distribution subject to its copyleft conditions.

Copyleft

  • GPL-3.0: strong copyleft.
  • LGPL-3.0: weak (library / module level) copyleft.
  • GPL-3.0 code in a project licensed under LGPL-3.0: Using GPL-3.0 code in a project under LGPL-3.0 is one-directional: LGPL-3.0 code can go into a work under GPL-3.0, but a distributed work containing GPL-3.0 code must as a whole be licensed under GPL-3.0. Your own files may keep LGPL-3.0, yet the project can no longer be distributed under LGPL-3.0 alone.
  • LGPL-3.0 code in a project licensed under GPL-3.0: LGPL-3.0 permits its code to be used under the terms of the GPL, so it can be combined into a work distributed under GPL-3.0.

Source Disclosure

  • GPL-3.0: whole distributed work based on it.
  • LGPL-3.0: the library and changes to it.
  • GPL-3.0 code in a project licensed under LGPL-3.0: Using GPL-3.0 code in a project under LGPL-3.0 is one-directional: LGPL-3.0 code can go into a work under GPL-3.0, but a distributed work containing GPL-3.0 code must as a whole be licensed under GPL-3.0. Your own files may keep LGPL-3.0, yet the project can no longer be distributed under LGPL-3.0 alone.
  • LGPL-3.0 code in a project licensed under GPL-3.0: LGPL-3.0 permits its code to be used under the terms of the GPL, so it can be combined into a work distributed under GPL-3.0.

Attribution

  • GPL-3.0: License the whole conveyed work under GPL-3.0.
  • GPL-3.0: Provide Corresponding Source when conveying object code.
  • GPL-3.0: Keep copyright and licence notices and include the licence.
  • GPL-3.0: Mark modified versions with prominent notices of changes.
  • GPL-3.0: Provide Installation Information for User Products.
  • LGPL-3.0: Provide source of the library and of modifications to it when distributing.
  • LGPL-3.0: Give prominent notice that the library is used and that it is covered by the LGPL.
  • LGPL-3.0: Accompany the Combined Work with copies of the GPL and LGPL.
  • GPL-3.0 code in a project licensed under LGPL-3.0: GPL-3.0 requires the copyright and licence notices to be kept with copies you distribute.
  • LGPL-3.0 code in a project licensed under GPL-3.0: LGPL-3.0 requires the copyright and licence notices to be kept with copies you distribute.

Patent Considerations

  • Express patent licence: GPL-3.0: yes; LGPL-3.0: yes.
  • Patent termination clause: GPL-3.0: yes; LGPL-3.0: yes.
  • GPL-3.0 code in a project licensed under LGPL-3.0: GPL-3.0 includes an express patent licence from contributors. That patent licence terminates for anyone who initiates patent litigation alleging that the work infringes a patent.
  • LGPL-3.0 code in a project licensed under GPL-3.0: LGPL-3.0 includes an express patent licence from contributors. That patent licence terminates for anyone who initiates patent litigation alleging that the work infringes a patent.

Common Scenarios

ScenarioGPL-3.0 code in a project licensed under LGPL-3.0LGPL-3.0 code in a project licensed under GPL-3.0
Use as a dependency / libraryPotential ConflictCompatible With Conditions
Copy source code into the projectPotential ConflictCompatible With Conditions
Modify the componentPotential ConflictCompatible With Conditions
SaaS / network service (not distributed)Compatible With ConditionsCompatible With Conditions
Internal / private use onlyGenerally CompatibleCompatible With Conditions
Resell the softwarePotential ConflictCompatible With Conditions
White-label / rebrandPotential ConflictCompatible With Conditions

FAQ

Can I use GPL-3.0 code in a project licensed under LGPL-3.0?

Using GPL-3.0-licensed code in a project under LGPL-3.0 may conflict, depending on how the code is combined, distributed and licensed. Using GPL-3.0 code in a project under LGPL-3.0 is one-directional: LGPL-3.0 code can go into a work under GPL-3.0, but a distributed work containing GPL-3.0 code must as a whole be licensed under GPL-3.0. Your own files may keep LGPL-3.0, yet the project can no longer be distributed under LGPL-3.0 alone.

Can I use LGPL-3.0 code in a project licensed under GPL-3.0?

Using LGPL-3.0-licensed code in a project under GPL-3.0 is generally possible if the listed conditions are met. LGPL-3.0 permits its code to be used under the terms of the GPL, so it can be combined into a work distributed under GPL-3.0.

Can GPL-3.0-licensed code be used in closed-source commercial software?

Using GPL-3.0-licensed code in a proprietary project is likely incompatible in this scenario, as the licence terms are generally understood. If a work based on GPL-3.0 code is distributed, the whole work must be licensed under GPL-3.0 with its complete source available. That is generally incompatible with distributing the project under proprietary terms.

Can LGPL-3.0-licensed code be used in closed-source commercial software?

Using LGPL-3.0-licensed code in a proprietary project is generally possible if the listed conditions are met. An application that uses an LGPL-3.0 library may be distributed under its own terms, including proprietary terms, when section 4 is met: typically by using the library as a replaceable shared library, giving notice of its use, and including the licence.

Do I have to publish my source code when I use GPL-3.0 code?

If a work based on GPL-3.0 code is distributed, the whole work must be licensed under GPL-3.0 with its complete source available. That is generally incompatible with distributing the project under proprietary terms.

Do I have to publish my source code when I use LGPL-3.0 code?

An application that uses an LGPL-3.0 library may be distributed under its own terms, including proprietary terms, when section 4 is met: typically by using the library as a replaceable shared library, giving notice of its use, and including the licence.

Can I use GPL-3.0 code in a closed-source SaaS?

Using GPL-3.0-licensed code in a proprietary project is generally possible if the listed conditions are met. GPL-3.0 has no network-use clause: running GPL-3.0 code on your servers to provide a service, without distributing it, generally does not require releasing source. This depends on the code not being distributed.

Can I use LGPL-3.0 code in a closed-source SaaS?

Using LGPL-3.0-licensed code in a proprietary project is generally compatible in this scenario. LGPL-3.0 copyleft conditions are triggered by distribution; this scenario does not include distribution.

Try the Interactive Checker

Change the scenario, say whether the code is modified, distributed or offered as SaaS, and see every rule that applies.

Related Comparisons

Authoritative Sources

This tool provides general software licensing information and is not legal advice. License obligations may depend on how software components are combined, modified, distributed and used. For high-risk results, review the actual license text before relying on this result.