Skip to content
Open Sourceintermediate

What is the Apache License 2.0?

Updated Nov 30, 20263 min readBased on official documentation
What is the Apache License 2.0?

In short

The Apache License 2.0 is a free, open source software license. It lets anyone use, copy, change and redistribute software, including for commercial products, as long as they keep the license and notices in place. It also includes an explicit patent license from contributors.

What the license lets you do

The Apache License 2.0 is a written agreement that sits alongside a piece of software. It tells you what you may do with that software. The license was published by the Apache Software Foundation, and it is one of the most widely used licenses in open source.

In plain terms, the license grants you permission to reproduce the work, change it, show it publicly, sublicense it, and distribute it. These rights apply to both the source code and the compiled form. The grant is perpetual, worldwide, and free of charge. You do not pay royalties, and the permission does not expire.

Because of this wording, companies often use Apache-licensed code inside paid products. The license does not require you to publish your own changes under the same terms.

Key terms you should know

The license uses a few defined words. Knowing them makes the rest of the text easier to read.

  • Work: the software or text that is covered by the license.
  • Derivative Works: new material based on the Work, such as a modified version or a larger program built on it.
  • Contribution: anything intentionally sent to the project owner for inclusion in the Work.
  • Contributor: the copyright owner or anyone whose contribution was accepted into the Work.

The license also separates source form, the readable code you edit, from object form, the output of a build or conversion step.

Patent protection

Section 3 covers patents. Each contributor grants you a patent license for the parts of the Work that their own contribution uses. This matters because a copyright license alone does not protect you from patent claims.

The protection has a condition. If you start a patent lawsuit claiming that the Work infringes your patent, the patent licenses you received under this license for that Work end on the date the lawsuit is filed. This discourages users from attacking the project with patent claims.

What you must do

Redistribution comes with conditions. If you pass the software on, you must meet several requirements:

  • Give every recipient a copy of the license.
  • Mark modified files with a notice saying that you changed them.
  • Keep copyright, patent, trademark and attribution notices from the original source in your distributed copy.
  • If the project includes a file named NOTICE, include its attribution text in your distribution, in a place the license describes, such as a NOTICE file or documentation.

You may add your own license terms to your own modifications, as long as the use of the original Work still follows this license.

Trademarks and warranty

The license does not give you permission to use the project's trade names, trademarks or product names. You may mention them to describe where the code came from, but that is all.

The software comes "AS IS", with no warranty. Contributors are not liable for damages that come from using the Work. You are responsible for deciding whether the software suits your use. If you offer support or a warranty to your own customers, you take on that obligation yourself.

Applying the license to your project

If you publish your own code under this license, the license text includes a short appendix. You add a notice with your copyright owner name and year to each source file, and you include the full license text in your project. The appendix recommends putting the file name and a short description on the same printed page as the copyright notice, so that the file is easy to find in archives.

For a broader look at how licenses differ, see our open source license guides once they are available on Blozhik. Always read the official text yourself before relying on it for a legal decision.

FAQ

Can I use Apache 2.0 software in a commercial product?

Yes. The license allows commercial use, including selling products that include the software. You must still keep the required notices and include a copy of the license when you distribute it.

Do I have to open source my own code if I use Apache 2.0 software?

No. The license does not force you to publish your own modifications or larger programs under the same terms. You may add your own license terms to your own derivative work, provided the original Work still follows this license.

What is the NOTICE file?

A NOTICE file is an optional text file that some projects include. If the project has one, you must carry its attribution text into your distribution. The license says the NOTICE contents are informational and do not change the license itself.

Does Apache 2.0 give me a patent license?

Yes, contributors grant a patent license for the parts of the Work their contributions use. That license ends if you sue someone claiming the Work infringes a patent.

Sources

This page is based on the official documentation below. Read it for full detail.

Apache License 2.0 — official documentation ↗
blozhikDeveloper news from across the web, explained. Every story links to its original sources.