Apache License 2.0, explained

Permissive Apache-2.0

Apache-2.0 is a permissive licence with an explicit patent grant: you can use the code in any product, closed source included, if you keep its notices and say what you changed.

Not legal advice. Read the licence text for the exact terms.

What it allows

  • Use the code commercially and in closed-source products
  • Modify it
  • Rely on a patent licence from each contributor for their contributions

What it requires

  • Include a copy of the licence
  • Keep copyright, patent, trademark and attribution notices, and the NOTICE file if there is one
  • Mark the files you changed
  • Do not use the authors' trademarks beyond describing where the code comes from

When it matters

Shipping an app (desktop, mobile, on-premises)Allowed, closed source included. Include the licence text and copyright notice, usually in a third-party notices file or an "About" screen.
A hosted service (SaaS)Allowed. Nothing to publish; the notice requirement applies when you distribute the code, and JavaScript sent to browsers counts, so keep notices in your bundles.
Internal useAllowed, with no conditions to meet while the code stays inside your organisation.

Its family: permissive

You can use, change and ship the code in any product, including closed-source ones. You must keep the copyright and licence notice (usually in a third-party notices file); Apache-2.0 also asks you to state changes and keep its NOTICE file.

Questions

Can I use Apache-2.0 code in commercial software?

Yes, including closed-source software, if you keep the notices and the NOTICE file.

Is Apache-2.0 compatible with GPL?

With GPL-3.0, yes: Apache-2.0 code can go into a GPL-3.0 project. With GPL-2.0-only, the Free Software Foundation considers them incompatible because of the patent terms.

What happens if I sue over a patent?

The patent licence you received for the code ends if you start patent litigation claiming the work infringes a patent (section 3).

Other licences

Published ; awaiting review.