Permissions, conditions and limitations at a glance
Conditions
- License and copyright noticeA copy of the license and the copyright notice must be included when distributing.
- State changesChanges made to the original must be indicated.
Limitations
- Trademark useExpressly states that no trademark rights are granted.
- LiabilityExpressly states that there is no liability for damages.
- WarrantyExpressly states that no warranty is provided.
Permissions, conditions and limitations are classified using data from choosealicense.com (GitHub, MIT License).
What kind of license is it?
The Apache License 2.0 is a permissive license published by the Apache Software Foundation (ASF) in 2004. Like MIT, it broadly permits commercial use, modification and redistribution, but its text is longer and its clauses more specific. Its defining feature is Section 3, in which contributors expressly grant patent rights. If someone files a patent lawsuit claiming the software infringes their patent, the patent license they received terminates as of the date the litigation is filed (patent retaliation clause). Kubernetes, TensorFlow, much of the Android Open Source Project (AOSP) and every Apache Foundation project use this license.
What you must do when distributing (Section 4)
- Give recipients a copy of the license.
- Mark modified files with prominent notices stating that you changed them.
- When distributing in source form, retain the original copyright, patent, trademark and attribution notices (excluding those that do not pertain to the work).
- If the original includes a
NOTICEfile, include its contents in an appropriate place in your distribution (a NOTICE file, documentation, a display, etc.). You may add your own attribution notices for your modifications to the NOTICE. - You may add different license terms to your modifications, but the original part must follow Apache-2.0 terms.
How to apply it
Put the text unchanged in the LICENSE file. The "APPENDIX" at the end of the text is guidance on how to apply the license and does not need to be deleted. Put your copyright notice in the notice at the top of each source file (the generator's "File header" tab → official notice) or in a NOTICE file. NOTICE is not mandatory, and the ASF recommends keeping it short, containing only legally required attribution notices.
Common misconceptions
- "Apache code cannot go into GPL projects" — It can go into GPL-3.0 projects. The FSF considers Apache-2.0 compatible with GPL-3.0. However, because of its patent termination and indemnification clauses, the FSF considers it incompatible with GPL-2.0 (only).
- "If you modify it, you must publish the source" — No. You must mark the changes, but there is no obligation to disclose source.
- "I have to put my name in the license file" — The Apache-2.0 text has no placeholders. The
[yyyy] [name of copyright owner]in the appendix is an example for file headers. - "Releasing under Apache lets others use my logo and name" — Section 6 expressly does not grant trademark rights.
When it fits
It suits cross-company collaborative projects, patent-heavy fields (machine learning, cloud, telecommunications, etc.) and large projects with many contributors. Being permissive, it is easy to include in commercial products while reducing the risk of patent disputes. If the code is likely to be used together with GPL-2.0 projects, consider MIT or MIT OR Apache-2.0 dual licensing.
Can Apache-2.0 code go into another project?
General verdicts for taking code released under this license and distributing it combined into a project under each license below. See other combinations in the compatibility checker →
| Target project | Verdict | Notes |
|---|---|---|
| Proprietary (closed-source) software | Allowed | Keep the LICENSE copy and the copyright and NOTICE content, and mark modified files as changed. |
| MIT | Allowed | Keep the LICENSE copy and the copyright and NOTICE content, and mark modified files as changed. |
| MPL-2.0 | Allowed | Keep the LICENSE copy and the copyright and NOTICE content, and mark modified files as changed. |
| LGPL-2.1 | Not allowed | The FSF considers Apache-2.0's patent termination and indemnification clauses to be additional restrictions not found in GPL-2.0, so it is not compatible with GPL-2.0 (only). |
| LGPL-3.0 | Allowed | Keep the LICENSE copy and the copyright and NOTICE content, and mark modified files as changed. |
| GPL-2.0 | Not allowed | The FSF considers Apache-2.0's patent termination and indemnification clauses to be additional restrictions not found in GPL-2.0, so it is not compatible with GPL-2.0 (only). |
| GPL-3.0 | Allowed | Keep the LICENSE copy and the copyright and NOTICE content, and mark modified files as changed. |
| AGPL-3.0 | Allowed | Keep the LICENSE copy and the copyright and NOTICE content, and mark modified files as changed. |
The content on this site is general information, not legal advice. For actual distribution, contracts or disputes, consult a lawyer or other qualified professional.