The Apache License 2.0 explained in plain words
The Apache License 2.0 is a permissive open-source license. You may use, change and redistribute the software for any purpose, including in closed-source commercial products, as long as you pass on the license, keep the existing notices, mark files you changed and do not use the Apache trademarks. It also grants you a patent license.
Not legal advice. This page is a plain-language summary to help you read the license. Only the English license text at apache.org is authoritative. For a real decision, ask a lawyer who knows software licensing.
The basics
- 2.0current version, dated January 2004
- 9numbered sections of terms
- Apache-2.0SPDX short identifier
The Apache Software Foundation (ASF) releases its software under this license, including the Apache HTTP Server, Tomcat, Log4j, Lucene and Solr and the rest. The older versions 1.0 and 1.1 are still published for reference. Version 2.0 was designed to be reused, and many projects outside the ASF use it too.
A few terms used in the license:
- Work
- The software (or documentation) released under the license.
- Derivative Works
- Something based on the Work, such as a modified copy. The license says code that only links to the Work's interfaces, and stays separable from it, is not a Derivative Work.
- Contribution and Contributor
- Code someone deliberately submits for inclusion, and the people or companies who submitted it.
- Source and Object form
- Editable source code versus compiled or generated output.
What you may do
Section 2 gives every recipient a copyright license that is "perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable" to:
- reproduce the software and make modified versions,
- display and perform it publicly,
- sublicense it, and
- distribute the original or your modified version, as source or as compiled code.
The ASF's license FAQ adds practical answers. It does not distinguish between personal, internal and commercial use. You may give modified code away, sell it or keep it to yourself. You do not have to publish or contribute your changes, although the ASF encourages it. You may even release your modified version as a whole under a different license, as long as you still comply with the Apache License for the original parts.
What you must do when you redistribute
Section 4 sets four conditions. They apply when you pass copies to others, not when you only use the software in-house.
- Include the license. Give every recipient a copy of the Apache License 2.0.
- Mark your changes. Any file you modified must carry a prominent notice that you changed it.
- Keep the notices. In source you distribute, keep all copyright, patent, trademark and attribution notices from the original.
- Pass on the NOTICE file. If the original came with a file called
NOTICE, your distribution must include its attribution notices in at least one of three places: your own NOTICE file, your source or documentation, or a screen where your product normally shows third-party notices (an "About" or "Licenses" dialog, for example).
The NOTICE file is for attributions only; it cannot change the license terms. You may add your own attribution notices next to it. You may also put your own copyright statement on your changes and offer different terms for them.
Example
Your company ships a desktop app that bundles an Apache-licensed library, and you patched two of its files. To comply you would: include the Apache License text in the installer or app folder, add a comment at the top of the two patched files saying you changed them, leave the existing copyright headers in place, and copy the library's NOTICE text into your app's third-party notices screen. Your own code can stay closed.
The patent grant
Section 3 is what sets this license apart from simpler ones such as MIT or BSD. Each contributor grants you a patent license, also perpetual, worldwide and royalty-free, to make, use, sell, import and otherwise transfer the Work. It covers only the patent claims that the contributor's own contribution necessarily infringes, alone or combined with the Work it was submitted to.
There is one built-in defense. If you sue anyone, including through a cross-claim or counterclaim, claiming that the Work infringes your patent, then your patent licenses for that Work end on the date you file the suit. This "patent retaliation" clause discourages users from attacking the project with patents.
Other terms
- Contributions (section 5)
- Unless you say otherwise, anything you intentionally submit for inclusion is licensed under the same Apache License terms.
- Trademarks (section 6)
- The license grants no right to use the licensor's names or trademarks, except to describe where the work came from and to reproduce the NOTICE file. The ASF FAQ says you may not call a modified product "Apache Something", but "Something powered by Apache" or "based on Apache Tomcat" style phrases are acceptable.
- No warranty (section 7) and no liability (section 8)
- The software comes "AS IS". Contributors are not liable for damages from using it, unless the law requires it or they agreed in writing.
- Extra support or warranty (section 9)
- You may sell support, warranty or indemnity for your copy, but only on your own behalf. You must cover the other contributors for any liability you take on.
Compatibility with the GPL
The Free Software Foundation (FSF), which writes the GNU GPL, calls the Apache License 2.0 a free software license that is compatible with GPL version 3. It is not compatible with GPL version 2, because it has requirements that GPLv2 lacks, namely the patent termination and indemnification provisions. The FSF still recommends Apache 2.0 over other lax permissive licenses for substantial programs, because of the patent clause.
The ASF explains that the compatibility runs in one direction only:
- Apache code into a GPLv3 project: yes. GPLv3 accepts Apache-licensed code. The combined work is then distributed under GPLv3, and the Apache parts keep their notices.
- GPLv3 code into an Apache project: no. The ASF's own projects must be distributed under the Apache License, and the GPL would require the combination to be GPL. The ASF's third-party license policy puts GPL versions 1, 2 and 3 and the AGPL in "Category X": licenses its projects may not include. Permissive licenses such as BSD and MIT are in "Category A", which its projects may include.
- GPLv2-only: no. If a program is licensed "GPLv2 only", you cannot combine it with Apache 2.0 code. Code offered under "GPLv2 or later" is a different case, because it also offers GPLv3 terms, so check the exact license statement of each component.
Note that the ASF category lists set rules for ASF projects. Your own project may combine licenses differently, as long as you meet each license's terms.
Applying it to your own project
- Put the full license text in a file named
LICENSEat the top of your repository and archives. - Add a
NOTICEfile if you have attribution notices to pass on. The ASF's own guidance is to keep NOTICE as brief as possible and to put nothing in it that is not legally required. - Put a short header at the top of each source file, so the license travels with files that get copied out. The ASF FAQ offers the full standard header, or this short form:
Copyright 2026 Your Name or Company
SPDX-License-Identifier: Apache-2.0
The FAQ says using https:// instead of http:// in the license URL is fine and even encouraged. Changing the license wording itself is not: a modified text is no longer the Apache License and must not use "Apache" in its name.
Common mistakes
- Shipping an app or container image that bundles Apache-licensed libraries without their LICENSE and NOTICE texts.
- Deleting copyright headers from files you copied into your code base.
- Naming a fork "Apache Something", or implying that the ASF endorses your product.
- Assuming you can mix Apache 2.0 code into a GPLv2-only program.
- Relying on an unofficial translation. The ASF says translations are for convenience only; you must still include the English license.
To learn how the ASF itself works, see the Apache Software Foundation.
Sources
- Apache License, Version 2.0, The Apache Software Foundation
- Licenses, The Apache Software Foundation
- ASF Legal & Trademark, The Apache Software Foundation
- Licensing Frequently Asked Questions, The Apache Software Foundation
- Apache License v2.0 and GPL Compatibility, The Apache Software Foundation
- ASF 3rd Party License Policy, The Apache Software Foundation
- Applying the Apache License, Version 2.0, The Apache Software Foundation
- Various Licenses and Comments about Them, Free Software Foundation
- Assembling LICENSE and NOTICE files, Apache Infrastructure
- Apache License 2.0 (Apache-2.0), SPDX License List