MIT vs AGPL-3.0 License
MIT License compared with GNU Affero 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 AGPL-3.0
Generally CompatibleUsing MIT-licensed code in a project under AGPL-3.0 is generally compatible in this scenario.
MIT code can generally be included in a project under AGPL-3.0; the combined work is distributed under AGPL-3.0 while the MIT notices for that code are retained.
AGPL-3.0 code in a project licensed under MIT
Potential ConflictUsing AGPL-3.0-licensed code in a project under MIT may conflict, depending on how the code is combined, distributed and licensed.
Using AGPL-3.0 code in a project under MIT is one-directional: MIT code can go into a work under AGPL-3.0, but a distributed work containing AGPL-3.0 code must as a whole be licensed under AGPL-3.0. Your own files may keep MIT, yet the project can no longer be distributed under MIT alone.
Key Differences
- Copyleft: MIT: none; AGPL-3.0: strong, with network-use clause.
- Network-use (SaaS) clause: MIT: no; AGPL-3.0: yes.
- Source disclosure: MIT: not required; AGPL-3.0: whole distributed work based on it.
- Same licence for distributed changes: MIT: no; AGPL-3.0: yes.
- Mark modified files: MIT: no; AGPL-3.0: yes.
- Express patent licence: MIT: no; AGPL-3.0: yes.
- Patent termination clause: MIT: no; AGPL-3.0: yes.
Comparison Table
| MIT | AGPL-3.0 | |
|---|---|---|
| Type | Open source | Open source |
| OSI approved | Yes | Yes |
| Commercial use | Permitted | Permitted |
| Modification | Permitted | Permitted |
| Distribution | Permitted | Permitted |
| Copyleft | None | Strong, with network-use clause |
| Network-use (SaaS) clause | No | Yes |
| 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.
- AGPL-3.0: permitted.
- MIT code in a project licensed under AGPL-3.0: MIT permits commercial use.
- AGPL-3.0 code in a project licensed under MIT: AGPL-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.
AGPL-3.0 code in closed-source commercial software
Likely IncompatibleUsing AGPL-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 AGPL-3.0 code is distributed, the whole work must be licensed under AGPL-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.
- AGPL-3.0 code in closed-source commercial software: If a work based on AGPL-3.0 code is distributed, the whole work must be licensed under AGPL-3.0 with its complete source available. That is generally incompatible with distributing the project under proprietary terms.
SaaS
- Network-use clause: MIT: no; AGPL-3.0: yes.
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.
AGPL-3.0 code in a closed-source SaaS
Potential ConflictUsing AGPL-3.0-licensed code in a proprietary project may conflict, depending on how the code is combined, distributed and licensed.
AGPL-3.0 section 13 applies to modified versions offered over a network. Running an unmodified AGPL-3.0 program does not by itself trigger it, but integrating AGPL-3.0 code into your own service code (linking, importing, patching) generally creates a modified version.
Modified AGPL-3.0 code in a closed-source SaaS
Likely IncompatibleUsing AGPL-3.0-licensed code in a proprietary project is likely incompatible in this scenario, as the licence terms are generally understood.
AGPL-3.0 section 13: if you modify the program, users interacting with it remotely over a network must be offered the Corresponding Source of your modified version, even if it is never distributed. That is generally incompatible with keeping the service's code for that program proprietary.
- MIT code in a closed-source SaaS: MIT has no network-use (SaaS) clause.
- AGPL-3.0 code in a closed-source SaaS: AGPL-3.0 section 13 applies to modified versions offered over a network. Running an unmodified AGPL-3.0 program does not by itself trigger it, but integrating AGPL-3.0 code into your own service code (linking, importing, patching) generally creates a modified version.
- Modified AGPL-3.0 code in a closed-source SaaS: AGPL-3.0 section 13: if you modify the program, users interacting with it remotely over a network must be offered the Corresponding Source of your modified version, even if it is never distributed. That is generally incompatible with keeping the service's code for that program proprietary.
Modification
- MIT: permitted.
- AGPL-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 AGPL-3.0 code used in closed-source software
Likely IncompatibleUsing AGPL-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 AGPL-3.0 code is distributed, the whole work must be licensed under AGPL-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 AGPL-3.0 code used in closed-source software: AGPL-3.0 permits modification. AGPL-3.0 requires modified files to carry notices stating that they were changed.
Distribution
- MIT: permitted.
- AGPL-3.0: permitted.
- MIT code in a project licensed under AGPL-3.0: MIT permits distribution.
- AGPL-3.0 code in a project licensed under MIT: Using AGPL-3.0 code in a project under MIT is one-directional: MIT code can go into a work under AGPL-3.0, but a distributed work containing AGPL-3.0 code must as a whole be licensed under AGPL-3.0. Your own files may keep MIT, yet the project can no longer be distributed under MIT alone.
Copyleft
- MIT: none copyleft.
- AGPL-3.0: strong, with network-use clause copyleft.
- MIT code in a project licensed under AGPL-3.0: MIT code can generally be included in a project under AGPL-3.0; the combined work is distributed under AGPL-3.0 while the MIT notices for that code are retained.
- AGPL-3.0 code in a project licensed under MIT: Using AGPL-3.0 code in a project under MIT is one-directional: MIT code can go into a work under AGPL-3.0, but a distributed work containing AGPL-3.0 code must as a whole be licensed under AGPL-3.0. Your own files may keep MIT, yet the project can no longer be distributed under MIT alone.
Source Disclosure
- MIT: not required.
- AGPL-3.0: whole distributed work based on it.
- MIT code in a project licensed under AGPL-3.0: MIT does not require you to publish source code.
- AGPL-3.0 code in a project licensed under MIT: Using AGPL-3.0 code in a project under MIT is one-directional: MIT code can go into a work under AGPL-3.0, but a distributed work containing AGPL-3.0 code must as a whole be licensed under AGPL-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.
- AGPL-3.0: License the whole conveyed work under AGPL-3.0.
- AGPL-3.0: Provide Corresponding Source when conveying.
- AGPL-3.0: Offer Corresponding Source of a modified version to users interacting with it over a network (section 13).
- AGPL-3.0: Keep copyright and licence notices and include the licence.
- MIT code in a project licensed under AGPL-3.0: MIT requires the copyright and licence notices to be kept with copies you distribute.
- AGPL-3.0 code in a project licensed under MIT: AGPL-3.0 requires the copyright and licence notices to be kept with copies you distribute.
Patent Considerations
- Express patent licence: MIT: no; AGPL-3.0: yes.
- Patent termination clause: MIT: no; AGPL-3.0: yes.
- MIT code in a project licensed under AGPL-3.0: MIT contains no express patent licence. Any patent permission would depend on implied licence doctrines, which vary by jurisdiction.
- AGPL-3.0 code in a project licensed under MIT: AGPL-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 AGPL-3.0 | AGPL-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 | Generally Compatible |
| 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 AGPL-3.0?
Using MIT-licensed code in a project under AGPL-3.0 is generally compatible in this scenario. MIT code can generally be included in a project under AGPL-3.0; the combined work is distributed under AGPL-3.0 while the MIT notices for that code are retained.
Can I use AGPL-3.0 code in a project licensed under MIT?
Using AGPL-3.0-licensed code in a project under MIT may conflict, depending on how the code is combined, distributed and licensed. Using AGPL-3.0 code in a project under MIT is one-directional: MIT code can go into a work under AGPL-3.0, but a distributed work containing AGPL-3.0 code must as a whole be licensed under AGPL-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 AGPL-3.0-licensed code be used in closed-source commercial software?
Using AGPL-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 AGPL-3.0 code is distributed, the whole work must be licensed under AGPL-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 AGPL-3.0 code?
If a work based on AGPL-3.0 code is distributed, the whole work must be licensed under AGPL-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 AGPL-3.0 code in a closed-source SaaS?
Using AGPL-3.0-licensed code in a proprietary project may conflict, depending on how the code is combined, distributed and licensed. AGPL-3.0 section 13 applies to modified versions offered over a network. Running an unmodified AGPL-3.0 program does not by itself trigger it, but integrating AGPL-3.0 code into your own service code (linking, importing, patching) generally creates a modified version.
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: AGPL-3.0-only
- OSIOpen Source Initiative: GNU Affero General Public License version 3
- Official textGNU AGPL 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.