MIT vs GPL-3.0 License
MIT License compared with GNU 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):
MIT code in a project licensed under GPL-3.0
Generally CompatibleUsing MIT-licensed code in a project under GPL-3.0 is generally compatible in this scenario.
MIT code can generally be included in a project under GPL-3.0; the combined work is distributed under GPL-3.0 while the MIT notices for that code are retained.
GPL-3.0 code in a project licensed under MIT
Potential ConflictUsing GPL-3.0-licensed code in a project under MIT may conflict, depending on how the code is combined, distributed and licensed.
Using GPL-3.0 code in a project under MIT is one-directional: MIT 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 MIT, yet the project can no longer be distributed under MIT alone.
Key Differences
- Copyleft: MIT: none; GPL-3.0: strong.
- Source disclosure: MIT: not required; GPL-3.0: whole distributed work based on it.
- Same licence for distributed changes: MIT: no; GPL-3.0: yes.
- Mark modified files: MIT: no; GPL-3.0: yes.
- Express patent licence: MIT: no; GPL-3.0: yes.
- Patent termination clause: MIT: no; GPL-3.0: yes.
Comparison Table
| MIT | GPL-3.0 | |
|---|---|---|
| Type | Open source | Open source |
| OSI approved | Yes | Yes |
| Commercial use | Permitted | Permitted |
| Modification | Permitted | Permitted |
| Distribution | Permitted | Permitted |
| Copyleft | None | Strong |
| Network-use (SaaS) clause | No | No |
| Source disclosure | Not required | Whole distributed work based on it |
| Same licence for distributed changes | No | Yes |
| Attribution / notices | Yes | Yes |
| Mark modified files | No | Yes |
| Express patent licence | No | Yes |
| Patent termination clause | No | Yes |
| Trademark rights granted | Not addressed | Not addressed |
Commercial Use
- MIT: permitted.
- GPL-3.0: permitted.
- MIT code in a project licensed under GPL-3.0: MIT permits commercial use.
- GPL-3.0 code in a project licensed under MIT: GPL-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
MIT code in closed-source commercial software
Generally CompatibleUsing MIT-licensed code in a proprietary project is generally compatible in this scenario.
MIT generally allows the code to be included in proprietary software without releasing your source code, provided its notices are kept.
GPL-3.0 code in closed-source commercial software
Likely IncompatibleUsing 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.
- MIT code in closed-source commercial software: MIT generally allows the code to be included in proprietary software without releasing your source code, provided its notices are kept.
- 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.
SaaS
- Network-use clause: MIT: no; GPL-3.0: no.
MIT code in a closed-source SaaS
Generally CompatibleUsing MIT-licensed code in a proprietary project is generally compatible in this scenario.
MIT generally allows the code to be included in proprietary software without releasing your source code, provided its notices are kept.
GPL-3.0 code in a closed-source SaaS
Compatible With ConditionsUsing 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.
- MIT code in a closed-source SaaS: MIT has no network-use (SaaS) clause.
- 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.
Modification
- MIT: permitted.
- GPL-3.0: permitted; modified files must be marked.
Modifying MIT code used in closed-source software
Generally CompatibleUsing MIT-licensed code in a proprietary project is generally compatible in this scenario.
MIT generally allows the code to be included in proprietary software without releasing your source code, provided its notices are kept.
Modifying GPL-3.0 code used in closed-source software
Likely IncompatibleUsing 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 MIT code used in closed-source software: MIT permits modification.
- 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.
Distribution
- MIT: permitted.
- GPL-3.0: permitted.
- MIT code in a project licensed under GPL-3.0: MIT permits distribution.
- GPL-3.0 code in a project licensed under MIT: Using GPL-3.0 code in a project under MIT is one-directional: MIT 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 MIT, yet the project can no longer be distributed under MIT alone.
Copyleft
- MIT: none copyleft.
- GPL-3.0: strong copyleft.
- MIT code in a project licensed under GPL-3.0: MIT code can generally be included in a project under GPL-3.0; the combined work is distributed under GPL-3.0 while the MIT notices for that code are retained.
- GPL-3.0 code in a project licensed under MIT: Using GPL-3.0 code in a project under MIT is one-directional: MIT 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 MIT, yet the project can no longer be distributed under MIT alone.
Source Disclosure
- MIT: not required.
- GPL-3.0: whole distributed work based on it.
- MIT code in a project licensed under GPL-3.0: MIT does not require you to publish source code.
- GPL-3.0 code in a project licensed under MIT: Using GPL-3.0 code in a project under MIT is one-directional: MIT 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 MIT, yet the project can no longer be distributed under MIT alone.
Attribution
- MIT: Include the copyright notice and permission notice in all copies or substantial portions.
- 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.
- MIT code in a project licensed under GPL-3.0: MIT requires the copyright and licence notices to be kept with copies you distribute.
- GPL-3.0 code in a project licensed under MIT: GPL-3.0 requires the copyright and licence notices to be kept with copies you distribute.
Patent Considerations
- Express patent licence: MIT: no; GPL-3.0: yes.
- Patent termination clause: MIT: no; GPL-3.0: yes.
- MIT code in a project licensed under GPL-3.0: MIT contains no express patent licence. Any patent permission would depend on implied licence doctrines, which vary by jurisdiction.
- GPL-3.0 code in a project licensed under MIT: 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.
Common Scenarios
| Scenario | MIT code in a project licensed under GPL-3.0 | GPL-3.0 code in a project licensed under MIT |
|---|---|---|
| Use as a dependency / library | Generally Compatible | Potential Conflict |
| Copy source code into the project | Generally Compatible | Potential Conflict |
| Modify the component | Generally Compatible | Potential Conflict |
| SaaS / network service (not distributed) | Generally Compatible | Compatible With Conditions |
| Internal / private use only | Generally Compatible | Generally Compatible |
| Resell the software | Generally Compatible | Potential Conflict |
| White-label / rebrand | Generally Compatible | Potential Conflict |
FAQ
Can I use MIT code in a project licensed under GPL-3.0?
Using MIT-licensed code in a project under GPL-3.0 is generally compatible in this scenario. MIT code can generally be included in a project under GPL-3.0; the combined work is distributed under GPL-3.0 while the MIT notices for that code are retained.
Can I use GPL-3.0 code in a project licensed under MIT?
Using GPL-3.0-licensed code in a project under MIT may conflict, depending on how the code is combined, distributed and licensed. Using GPL-3.0 code in a project under MIT is one-directional: MIT 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 MIT, yet the project can no longer be distributed under MIT alone.
Can MIT-licensed code be used in closed-source commercial software?
Using MIT-licensed code in a proprietary project is generally compatible in this scenario. MIT generally allows the code to be included in proprietary software without releasing your source code, provided its notices are kept.
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.
Do I have to publish my source code when I use MIT code?
MIT does not require you to publish source code.
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.
Can I use MIT code in a closed-source SaaS?
Using MIT-licensed code in a proprietary project is generally compatible in this scenario. MIT generally allows the code to be included in proprietary software without releasing your source code, provided its notices are kept.
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.
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
- SPDXSPDX License List: MIT
- OSIOpen Source Initiative: The MIT License
- SPDXSPDX License List: GPL-3.0-only
- OSIOpen Source Initiative: GNU General Public License version 3
- Official textGNU GPL v3.0 (official text)
- FAQGNU Project: Frequently Asked Questions about the GNU Licenses
- FSFGNU Project: Various Licenses and Comments about Them
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.