Skip to main content
FOSSA Logo
Free License Tool

Is Apache 2.0 compatible with GPL 2.0?

Apache 2.0-licensed code is not compatible with a GPL 2.0 project. Here is what that means for your obligations, conflicts, and distribution.

The license of the code you want to use.

The license you are applying to your project.

Apache 2.0GPL 2.0
Incompatible

The short answer

Apache 2.0's patent termination clauses add a restriction that GPL v2.0 does not permit, so the two cannot be mixed in the same program.

Key obligations

You cannot combine these two licenses in the same project.

Potential conflicts

Apache 2.0 includes explicit patent termination clauses that GPL v2.0 treats as an additional restriction, violating GPL v2.0 Section 6.

Distribution notes

Distribution of a combined work is prohibited.

Stop guessing. Start automating.

Modern applications pull in hundreds of transitive dependencies. A manual check can't keep up.

Disclaimer: This tool offers general guidance based on widely accepted open source community norms and does not constitute legal advice. For commercial use, always consult legal counsel or use a dedicated compliance platform like FOSSA to analyze your specific dependency graph.

What this means in practice

Apache License 2.0 is a permissive (+ patent grant) license and GNU GPL v2.0 (Only) is a strong copyleft license. Combining them in a single distributed work is not permitted because their terms conflict. You can often still use the Apache 2.0 component if you keep it at arm's length — behind a separate process or network boundary — or by choosing an alternatively-licensed dependency.

Compliance checklist for Apache 2.0 GPL 2.0

  • Do not combine Apache 2.0 and GPL 2.0 code in the same distributed binary.
  • Isolate the Apache 2.0 component behind a process or network boundary if you must use it.
  • Evaluate an alternatively-licensed library, or re-license your project to resolve the conflict.
  • Get legal sign-off before shipping anything that links the two.

About these licenses

Apache License 2.0

Library

Permissive, with an express patent grant and a NOTICE-file requirement. Its patent terms make it incompatible with GPL v2.0.

Type
Permissive (+ patent grant)
Patent grant
Express
Source sharing
Not required

GNU GPL v2.0 (Only)

Project

Strong copyleft. Distributing a combined work means releasing all of it under GPL v2.0. The "only" variant is incompatible with the GPL v3 family.

Type
Strong copyleft
Patent grant
None
Source sharing
Entire combined work

Apache 2.0 and GPL 2.0: frequently asked questions

Common questions about combining Apache License 2.0 and GNU GPL v2.0 (Only).

Is Apache 2.0 compatible with GPL 2.0?

Apache 2.0's patent termination clauses add a restriction that GPL v2.0 does not permit, so the two cannot be mixed in the same program.

Can I use Apache 2.0 code in a GPL 2.0 SaaS or cloud application?

Apache 2.0's patent termination clauses add a restriction that GPL v2.0 does not permit, so the two cannot be mixed in the same program.

What are my obligations when combining Apache 2.0 and GPL 2.0?

You cannot combine these two licenses in the same project. Distribution of a combined work is prohibited.

Explore related comparisons

Get Started with FOSSA

Start managing your dependencies, licenses, and vulnerabilities today.