Apache 2.0
A permissive, business-ready open-source license: allows modifying, closing, and selling code while adding an explicit patent grant and clear trademark boundaries.
On this page
What is Apache 2.0?
Apache 2.0 (Apache License, Version 2.0) is a permissive open-source software license published by the Apache Software Foundation. Like MIT, it allows free use, editing, closed-source apps, and commercial sales—while adding explicit patent protection, change notices, and a clear no-trademark rule.
If MIT is a friendly sticky note saying “use my recipe however you like,” Apache 2.0 is a clear written agreement: “Sell the dish in your restaurant, I promise not to sue you over my cooking patent—just note your tweaks and don’t put my restaurant’s sign out front.”
Apache 2.0 stays business-friendly like MIT while clearly spelling out patent rights, attribution notices, and trademark limits.
How does Apache 2.0 work in a project?
Using or distributing Apache 2.0 code usually comes down to four clear steps:
Include the license: keep the full Apache 2.0
LICENSEfile in the repository root and include a copy when you distribute the software.Receive an explicit patent grant: contributors grant patent rights for their code—and if someone sues over a patent on that work, their patent license automatically ends.
Preserve copyright and NOTICE: keep original copyright lines, and if the project includes a
NOTICEfile, carry its attributions into your distribution.State your changes: if you modify original source files, add a prominent notice in those files stating that you changed them.
Apache 2.0 explicitly states that it grants no trademark rights. You can ship the code in a commercial product, but you cannot use the original project’s brand name or logo as your own.
Read a standard Apache 2.0 header
Because the full Apache 2.0 text is long, projects keep the full terms in a root LICENSE file and put a short boilerplate notice at the top of source files:
Copyright 2026 Alex Chenstates who owns the copyright and when it began.- The official URL
http://www.apache.org/licenses/LICENSE-2.0points readers to the exact license version. - Like MIT, it includes an “AS IS” disclaimer stating there are no warranties.
Here is the standard Apache 2.0 header template:
Copyright 2026 Alex Chen
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
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.In a real project, keep the full LICENSE file in the root folder, and do not drop the NOTICE file if the project has one.
How is Apache 2.0 different from MIT?
Both are top permissive open-source licenses that allow closed-source commercial apps. The main difference is how much legal detail they spell out.
| Compare | Apache 2.0 | MIT License |
|---|---|---|
| Patent clause | Includes an explicit patent grant and patent retaliation clause | Does not explicitly mention patents |
| Changes and NOTICE | Requires marking modified files and keeping any NOTICE file | Only requires keeping copyright and license notices |
| Trademark boundary | Explicitly states no trademark or trade-name rights are granted | Silent in the text (trademark law still applies separately) |
Solo tools and templates often pick MIT for its tiny length; large companies and multi-company infrastructure projects often prefer Apache 2.0 because its patent and notice clauses give legal teams extra clarity.
When is Apache 2.0 a good fit?
Apache 2.0 shines when you want broad commercial adoption plus explicit patent and trademark clarity.
- Enterprise and cloud infrastructure: projects like Kubernetes, Android, TypeScript, and TensorFlow use Apache 2.0.
- Multi-company collaborations: explicit patent terms reduce legal risk when many organizations contribute.
- Commercial-friendly SDKs and plugins: customers can integrate them into closed-source products while respecting your brand.
Trusted by corporate legal teams worldwide, commercial-friendly, and clear on patents and trademarks.
Longer to read than MIT, and you must remember to preserve any NOTICE file and note changes in edited source files.
Common things people get wrong
If a project is Apache 2.0, can I sell a modified version under its original name and logo?
No. Section 6 of Apache 2.0 explicitly states it does not grant permission to use the project’s trade names, trademarks, or product names. You can reuse the code, not the brand.
Does using an Apache 2.0 library force me to open-source my product?
No. Apache 2.0 is a permissive license that allows closed-source commercial use—just keep the LICENSE, keep any NOTICE file, and mark modified files.
Can I keep LICENSE and delete the original project’s NOTICE file?
No. If the upstream repository includes a NOTICE file, Apache 2.0 requires keeping its attribution notices in your distribution, docs, or “About” screen.
Quick quiz
You edit 3 files from an Apache 2.0 repo (which has both LICENSE and NOTICE files) and ship them inside a closed-source paid app. Do you have to open-source your app, and what must you keep?
No, you do not have to open-source your app. Apache 2.0 allows closed-source commercial apps. Just include the LICENSE and NOTICE attributions, mark the 3 modified files, and do not use the original project’s trademark.
Remember this: Apache 2.0 is “MIT with patent protection and stricter paperwork”—commercial use is allowed, just keep NOTICE, mark edits, and respect trademarks.
Read further
These official pages cover the full Apache 2.0 text and obligations.