Apache License 2.0 - Practical Usage Guide
Apache License 2.0 is an open source license created by the Apache Software Foundation. It broadly allows commercial use, modification, and redistribution, and its defining feature is the inclusion of a patent license clause. It is used by many projects such as Android, Kubernetes, and TensorFlow.
Features of Apache License 2.0
Section titled “Features of Apache License 2.0”Like the MIT License, Apache License 2.0 is permissive for commercial use. However, its conditions are more detailed, and the following points are especially different:
| Item | Apache License 2.0 | MIT License |
|---|---|---|
| Commercial use | Allowed | Allowed |
| Modification and redistribution | Allowed | Allowed |
| Source disclosure | Not required | Not required |
| Keeping copyright notices | Required | Required |
| Marking changes | Required | Not required |
| Carrying over NOTICE files | Required if one exists | None |
| Patent license grant | Yes | None |
| Patent termination clause | Yes | None |
Rules and Notes for Use
Section titled “Rules and Notes for Use”Copyright Notices and the LICENSE File
Section titled “Copyright Notices and the LICENSE File”When you redistribute software, whether on GitHub or as part of a product, you must include the full Apache License 2.0 text.
- Put the license text in a
LICENSEfile at the project root - Keep the original copyright notices in the source code
⚠️ Important Removing copyright notices can lead to copyright infringement risk. Keep them whether or not you modify the code.
Marking Modified Parts
Section titled “Marking Modified Parts”If you change the original source code, you must clearly state that changes were made.
- Add a comment in the changed file, such as “This file was modified”
- Or record the changes in the README or CHANGELOG
// This file modifies original code under Apache License 2.0.
// Change summary: Updated the process from 〇〇 to △△ (2026-01-15)Handling the NOTICE File
Section titled “Handling the NOTICE File”If the original project includes a NOTICE file, you must carry that content over into the derivative work.
- Publish the NOTICE content in the derivative project’s
NOTICEfile, documentation, or display screen - You may add your own attribution information as well
💡 Tip The NOTICE file is informational and does not change the license terms. However, it must not be removed.
Whether Credit Is Required
Section titled “Whether Credit Is Required”Apache License 2.0 itself does not require you to add credit lines to the original repository. However, if the original copyright holder or project name is clearly stated in the source, you must keep it.
Adding the original project or author name to the README or website is not mandatory, but it is recommended as an open source practice.
Licensing Your Own Modifications
Section titled “Licensing Your Own Modifications”One important feature of Apache License 2.0 is that you do not have to relicense the whole derivative work under Apache License 2.0.
- New parts you create yourself can use another license, including proprietary licensing
- However, the original Apache License 2.0 parts must still be distributed under Apache License 2.0
Notes for Publishing on GitHub
Section titled “Notes for Publishing on GitHub”When publishing a repository on GitHub, follow these steps:
-
Place a LICENSE file: Put the full Apache 2.0 text in
LICENSEat the project root so GitHub recognizes it -
Add headers to source files (recommended): Add copyright notices and license text to the top of each source file
Copyright [yyyy] [copyright holder or organization] Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at https://www.apache.org/licenses/LICENSE-2.0 -
Carry over NOTICE files: If the original project has a NOTICE file, include it and add your own attribution if needed
-
State the license in the README: Mention that the project uses Apache 2.0 and explain the original project information
Notes When Embedding in a Commercial Product
Section titled “Notes When Embedding in a Commercial Product”Apache License 2.0 allows commercial use and also permits product inclusion and sale. The most important points for commercial use are:
Patent License Clause
Section titled “Patent License Clause”Under Apache 2.0, contributors grant users a patent license for the parts they contributed. This lets you use those patented contributions without infringing, but if you sue a contributor for patent infringement, the patent license ends.
Keep track of patent-related elements in commercial products and be aware of litigation risk.
Trademarks
Section titled “Trademarks”Apache License 2.0 does not grant trademark rights. If you want to use the original project name (for example, “Apache XYZ”) or its logo, you need permission from the rights holder.
Warranty and Disclaimer
Section titled “Warranty and Disclaimer”Apache License 2.0 also provides the software “as is.” Even when it is part of a commercial product, you are responsible for operations, support, and warranty.
⚠️ Important Even when distributing binary products to customers, make sure the license copy and copyright notices are visible in documentation or settings screens.
Best Practices Summary
Section titled “Best Practices Summary”- Include the LICENSE file: Always include the Apache License 2.0
LICENSEfile in the project or product - Use NOTICE properly: Carry over the original NOTICE and add your own attribution information
- State the license in the README: Document the license type and original project information
- Check license compatibility: When combining multiple OSS components, verify the licenses are compatible
- Consider patents and trademarks: For commercial use, think through patent risk and consult experts if needed
Frequently Asked Questions
Section titled “Frequently Asked Questions”Q: Which should I choose, MIT or Apache License 2.0? A: If you are publishing your own OSS and care about patent protection, choose Apache License 2.0. If you want simplicity, MIT is more common. If you are using existing OSS, follow that project’s license.
Q: Can I use Apache License 2.0 code in a closed-source product? A: Yes. There is no source disclosure requirement. However, if you redistribute it, you must include the license text, keep the copyright notices, and mark the changes.
Q: Can Apache License 2.0 and GPL be combined? A: It is compatible with GPL v3, but compatibility with GPL v2 requires care. When combining multiple licenses, check each license’s compatibility.