// GUIDE

Is it legal to reverse engineer software?

Published 2026-11-16 · Updated 2026-11-16

Not legal advice. This is general information about a complicated area, written for developers. Laws differ by country and change over time, and facts matter. Ask a lawyer who knows your jurisdiction before you rely on any of it.

Short answer: reverse engineering is not illegal as such, but several different areas of law can apply to it at once. Which ones matter depends on what you do (watch a product's behavior, or decompile and copy its code), what you agreed to (a license or terms of service) and where you are. This site stays on the safe end of that range: we estimate effort from public information and never publish cracked code, as explained on our guardrails page.

1. Copyright

Copyright protects the way software is written and presented (source code, object code, artwork, text). It does not protect ideas, methods of operation or functionality (in the US, 17 U.S.C. § 102(b)). That is why building your own program that does what another one does is generally allowed, while copying its code is not.

Studying a program often involves making copies of it, so courts have had to decide when that is allowed. In the US, the Ninth Circuit held in Sega v. Accolade (1992) and Sony v. Connectix (2000) that disassembly needed to reach unprotected functional elements can be fair use. In Google v. Oracle (2021) the Supreme Court held that Google's copying of Java API declaring code was fair use, without deciding whether such code is copyrightable. These are fact-specific decisions, not a blanket permission.

2. DMCA section 1201 (anti-circumvention)

Separate from copyright infringement, 17 U.S.C. § 1201 prohibits circumventing technological measures that control access to a copyrighted work, such as encryption or license checks. It applies even if you never copy anything infringing. Congress wrote limited exceptions, including:

  • Interoperability (§ 1201(f)): circumvention by someone who lawfully obtained a program, to the extent needed to make an independently created program work with it, if that was not already readily available.
  • Encryption research (§ 1201(g)) and security testing (§ 1201(j)), each with conditions.

The US Copyright Office also grants temporary exemptions in a rulemaking that repeats every three years, for example for some good-faith security research. They have conditions and expire unless renewed, so check the current list instead of relying on an old summary.

3. Licenses and terms of service

Many end-user license agreements (EULAs) and terms of service forbid reverse engineering. Breaking them is a contract problem, separate from copyright. In the US, the Federal Circuit enforced such a clause in Bowers v. Baystate (2003). Enforceability varies by jurisdiction and by how the terms were accepted. Accessing a web service in ways its terms prohibit can also raise computer-misuse issues (in the US, the CFAA, which the Supreme Court read narrowly in Van Buren v. United States, 2021, though accessing systems without authorization remains risky).

4. Trade secrets and patents

Both the US Defend Trade Secrets Act and the EU Trade Secrets Directive (2016/943) say that reverse engineering a lawfully obtained product is not by itself an improper way to acquire a trade secret. The EU text allows a legal duty or contract to limit it, so the license still matters. Patents are different: learning how something works does not give you a license to use a patented method.

5. The EU Software Directive

Directive 2009/24/EC gives lawful users two rights that a contract cannot take away. They may observe, study and test how a program functions to understand its ideas and principles while performing normal operations (Art. 5(3)). They may also decompile code when that is indispensable to achieve interoperability of an independently created program, subject to conditions such as the information not being otherwise readily available and the result not being used to make a substantially similar program (Art. 6). Contract terms contrary to Article 6 are null and void (Art. 8). In SAS Institute v World Programming (C-406/10, 2012), the Court of Justice held that a program's functionality, programming language and data file formats are not protected by copyright as such.

6. Jurisdiction differences

  • United States: fair use case law, plus § 1201 with its exemptions; contract terms are often enforced.
  • European Union: statutory rights to study and to decompile for interoperability that contracts cannot remove, implemented differently in each member state.
  • United Kingdom: the Copyright, Designs and Patents Act 1988 contains similar permissions (sections 50B and 50BA) for decompilation for interoperability and for observing, studying and testing a program.
  • Elsewhere: many countries have anti-circumvention laws under the WIPO Copyright Treaty, with exceptions of varying width. Do not assume US or EU rules apply.

7. Clean-room design

Clean-room design is the standard way to reduce copyright risk when you want to replicate behavior. One team studies the product and writes a functional specification that contains no code. A second team that has never seen the original builds from that specification, and both sides keep records. The method was used for 1980s PC BIOS clones. It lowers risk and proves independent creation. It does not remove contract, patent or anti-circumvention issues.

8. A practical checklist

  • Prefer public documentation, observable behavior and open-source prior art.
  • Read the license or terms of service you accepted before analyzing the product.
  • Do not bypass encryption, license checks or DRM, and do not touch systems you are not authorized to test.
  • Write your own code and use your own assets and branding.
  • Keep notes on how you worked, and consider a clean-room split for close clones.
  • Get legal advice before shipping anything close to a competitor's product.

For examples of how we apply this, see our positioning and guardrails, the full list of teardowns and the Notion teardown, which points to open-source projects instead of reconstructing the product.

Reverse engineering law: common questions

Is it illegal to reverse engineer software?
Not as such. Studying how software works is lawful in many situations, but copying code, circumventing access controls or breaking a license agreement can each create liability. The rules differ between the US, the EU and the UK.
Is it illegal to reverse engineer an API?
Reading public documentation and calling an API within its terms is normal. Probing a service you have no permission to use, or breaking its terms of service, carries contract and computer-misuse risk. In the US, Google v. Oracle (2021) found Google's reuse of Java API declarations to be fair use, which is not a rule that every API can be copied.
Is it illegal to reverse engineer an app?
Observing an app's behavior and network traffic on your own device is treated differently from decompiling it and copying its code. Anti-circumvention law and the app's license terms can apply to either. Check both before you start.
Can a license agreement or terms of service ban reverse engineering?
In the US, courts have enforced such clauses as contract terms (for example Bowers v. Baystate, Fed. Cir. 2003). In the EU, a contract cannot override the decompilation-for-interoperability right or the right to observe and test a program's functioning, so those terms are void to that extent.
What is clean-room design?
A process where one team studies the original product and writes a functional specification, and a separate team that never saw the original builds from that specification. The paper trail helps show the new code was written independently.