# License Compatibility

> Can code with two sets of rules go in one app? This is the answer.

**Field:** Software Development  
**Category:** Product & Releases  
**Also known as:** Compatible Licenses, License Conflict, GPL Compatibility

## Think of it like

It is like mixing paints. Some mix well, and some make a mess you cannot undo.

## Definition

License compatibility is whether code under two licenses can be joined in one program that you share. It works when you can obey both licenses at once. Code under a loose license can go into a GPL program, because the GPL's rules cover the loose ones. Two strong copyleft licenses often clash. Each one wants the whole program to use it.

## Example

Jack wants to add an Apache 2.0 library to a GPL 2.0 only program. The two clash, so he picks a different library that uses the MIT license.

## Why it matters

A clash can stop you from sharing your program at all. It is cheap to check before you add a library and costly to fix after.

## Common mistake

Thinking two open source licenses always mix. Apache 2.0 code fits into a GPL 3.0 program, but not into one that is GPL 2.0 only.

## Three principles

- **Obey both at once.** They fit when one program can follow all the rules of each.
- **Permissive mixes easily.** MIT and BSD code can go into almost any program.
- **Copyleft can clash.** Two strong copyleft rules may each want the whole app.

## Related terms

- [GNU General Public License (GPL)](https://learn.benibix.com/term/development/gnu-gpl)
- [Apache License 2.0](https://learn.benibix.com/term/development/apache-license)
- [Permissive License](https://learn.benibix.com/term/development/permissive-license)
- [Copyleft](https://learn.benibix.com/term/development/copyleft)
- [Software License](https://learn.benibix.com/term/development/software-license)

![A line of licences from the fewest rules on the left to the most on the right. Permissive: MIT, BSD and Apache 2.0, where you only keep the notice. Weak copyleft: LGPL and MPL 2.0, where you share changes to the library or the file. Strong copyleft: GPL, where you share the code of the whole program you hand out. Network copyleft: AGPL, where running it as a web service counts too.](https://learn.benibix.com/diagrams/dev5-license-spectrum.svg)

---

Source: https://learn.benibix.com/term/development/license-compatibility
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
