Skip to content
X

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.

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:

ItemApache License 2.0MIT License
Commercial useAllowedAllowed
Modification and redistributionAllowedAllowed
Source disclosureNot requiredNot required
Keeping copyright noticesRequiredRequired
Marking changesRequiredNot required
Carrying over NOTICE filesRequired if one existsNone
Patent license grantYesNone
Patent termination clauseYesNone

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 LICENSE file 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.

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)

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 NOTICE file, 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.

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.

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

When publishing a repository on GitHub, follow these steps:

  1. Place a LICENSE file: Put the full Apache 2.0 text in LICENSE at the project root so GitHub recognizes it

  2. 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
  3. Carry over NOTICE files: If the original project has a NOTICE file, include it and add your own attribution if needed

  4. 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:

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.

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.

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.

  • Include the LICENSE file: Always include the Apache License 2.0 LICENSE file 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

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.