Apache License

On this page 7

The Apache License is a permissive open source software license published by the Apache Software Foundation that lets anyone use, modify, distribute and sublicense the covered code, including in proprietary products, provided they keep copyright and license notices. In software licensing, its current version, Apache License 2.0 from 2004, is distinguished by an explicit patent license and a patent termination clause that most other permissive licenses lack.

Apache License 2.0 is one of the most widely used open source licenses, common in cloud infrastructure, data processing, mobile platforms and developer tooling. Its standard identifier is Apache-2.0 in the SPDX license list, and it is approved by the Open Source Initiative and recognized as a free software license by the Free Software Foundation.

What the Apache License grants and requires

The Apache License grants each recipient a perpetual, worldwide, royalty-free copyright license to reproduce, prepare derivative works, display and distribute the software, and a matching patent license covering contributors’ patents that their contributions necessarily infringe. In return, it sets a short list of conditions that apply when the software is redistributed.

The main sections of version 2.0 and their practical meaning are summarized below.

SectionContentPractical meaning
Section 2Copyright license grantBroad right to use, modify and distribute
Section 3Patent license grantContributors cannot sue users over their contributed code
Section 4Redistribution conditionsKeep notices, mark changes, pass on the license
Section 5Submission of contributionsContributions default to the same license
Section 6TrademarksNo right to use project names or logos
Sections 7 and 8Warranty disclaimer, liability limitSoftware provided as is
Key sections of Apache License 2.0

Section 4 contains the obligations users meet most often: provide a copy of the license, keep existing copyright, patent, trademark and attribution notices, add prominent notices in modified files, and include the contents of any NOTICE file in a readable form with the distribution.

The patent grant and patent termination clause

The defining feature of Apache License 2.0 is its express patent provisions. Each contributor grants a license to any of its patents that are infringed by its contribution alone or in combination with the work. This gives users clearer protection than licenses that are silent about patents, where an implied license may exist but is less certain.

The license also includes defensive termination: if a recipient starts patent litigation alleging that the work infringes a patent, all patent licenses granted to that recipient for that work end on the date the litigation is filed. This discourages patent aggression against the project without affecting the copyright license itself.

Apache License compared with MIT, GPL and other licenses

The Apache License belongs to the permissive family together with the MIT license and BSD licenses, all of which allow incorporation into closed-source software. It differs from them mainly in length, patent clarity and notice requirements. It differs fundamentally from the GPL, a copyleft license that requires derivative works to remain under the same terms when distributed.

LicenseTypeExplicit patent grantDerivative works
Apache License 2.0PermissiveYes, with terminationAny license, notices kept
MIT licensePermissiveNoAny license, notice kept
BSD 3-ClausePermissiveNoAny license, no endorsement use
GPL version 3Strong copyleftYesMust stay under GPL when distributed
MPL 2.0File-level copyleftYesModified files stay under MPL
Apache License 2.0 and neighboring licenses

Compatibility matters when combining code. Apache License 2.0 code can be included in GPL version 3 projects, but the Free Software Foundation considers it incompatible with GPL version 2, because the patent termination and indemnity terms add restrictions that version 2 does not allow.

Applying and complying with the Apache License

To apply the license to a project, maintainers place the full text in a LICENSE file at the repository root and add a short boilerplate header to source files. Projects that need extra attribution add a NOTICE file, which downstream distributors must carry forward. Users of Apache-licensed code face a different set of tasks, summarized below.

SituationWhat to doReason
Internal use onlyNo distribution obligations applyConditions attach to redistribution
Shipping unmodified binariesInclude license and NOTICE contentsSection 4 attribution requirements
Distributing modified sourceMark changed files prominentlyRecipients must see what changed
Embedding in a commercial appAdd notices to an about screen or documentationReadable attribution is required
Using the project nameSeek trademark permissionSection 6 grants no trademark rights
Compliance tasks by situation

Downstream authors may license their own modifications under different terms, including proprietary ones, as long as the original parts continue to meet the Apache conditions. Organizations usually track this through a software bill of materials and automated license scanning.

Common misunderstandings and pitfalls

The Apache License is simple to comply with, but misreadings are common, especially about notices and compatibility. The following points cause most problems in practice.

  • Dropping the NOTICE file when repackaging is the most frequent compliance failure.
  • Assuming permission to use the brand: the license explicitly excludes trademarks.
  • Combining with GPL version 2-only code creates a license conflict for the combined work.
  • Confusing version 1.1 with 2.0: older versions lack the patent grant and differ in attribution rules.
  • Believing Apache code must stay open: unlike copyleft licenses, it does not require releasing modifications.

The idea in brief

The Apache License is a set of generous rules for sharing software. Anyone may use the code, change it and even sell products built with it, without paying or asking permission. The main condition is to give credit: keep the original notices and say which files you changed.

It also includes a promise about patents. People who contribute code agree not to sue users over patents covering that code, and anyone who sues over it loses that protection. In short, it offers freedom to reuse plus clear legal peace of mind.

A practical scenario

A startup building a commercial analytics product uses an Apache-licensed data processing library and modifies two of its source files to improve performance. Before the first customer release, its legal and engineering staff review what the license requires for distribution, because the library will ship inside an installer delivered to paying customers rather than run only on internal servers.

The team keeps the library’s LICENSE file, copies the NOTICE file contents into the product’s third-party notices screen, and adds a comment at the top of each changed file stating that it was modified by the startup. The rest of the product remains proprietary, which the license allows. When marketing proposes calling the product an official edition of the library, the team drops the idea because the license grants no trademark rights. The outcome is a compliant release with no obligation to publish proprietary code, completed in a few hours of review.