Developer guide

Can my code be patented?

Short answer: Not the code itself. Source code is protected by copyright as soon as it is written, but a patent can protect the method or process your code carries out. That method can be patented when it is novel, non-obvious, useful, more than an abstract idea on a generic computer, and backed by documented human invention.

Software patentability in the United States depends on four statutory pillars under 35 U.S.C. §101–§103 plus adequate disclosure under §112. Patent PreCheck scores your source code against all of them in under 60 seconds.

Building with Cursor, Copilot, or Claude? Start at the AI-code patentability hub for tool-specific guides.

Can you patent code itself?

Not the code as written. Source code is protected by copyright as soon as it is written. A patent protects the method or process the code carries out: the technical way it solves a problem. Two developers can write completely different code for the same patented method, and the same code in a different program may raise no issue at all. So the real question is whether the technique your code implements is new, non-obvious, and more than an abstract idea.

The four questions the USPTO asks

  1. Patentable subject matter (§101 / Alice) — Is this more than an abstract idea implemented on a generic computer?
  2. Novelty (§102) — Did anyone disclose this exact invention before your filing date?
  3. Non-obviousness (§103) — Would a skilled developer combine prior art to reach your solution?
  4. Documentation & enablement (§112) — Does your disclosure teach how to make and use the invention?

The Alice test in plain English

After Alice Corp. v. CLS Bank, many software patents fail because they claim an abstract idea (organizing data, matching buyers and sellers, running a formula) without a specific technical improvement. Courts look for an unconventional computer implementation or measurable technical effect — not routine automation.

Examples that often struggle: generic CRUD apps, basic dashboards, standard API wrappers.
Examples that often fare better: novel caching under memory constraints, integrity checks that reduce specific failure modes, training pipelines with documented structural innovations.

Read our deep dive: Alice test for software developers.

Human vs. AI inventorship (2026)

The USPTO requires human inventors. AI cannot be listed on a patent application. If Cursor, Copilot, or Claude helped write your code, you must still show that a human conceived the claimed invention — specific problems framed, AI outputs rejected, parameters measured, and alternatives documented.

Patent PreCheck estimates human conception strength from your code and disclosure. See USPTO AI inventorship rules.

Prior art: what can kill your application

Prior art includes patents, published applications, papers, products, and open-source repositories public before your priority date. A GitHub repo can anticipate your claims if it discloses the same features.

Guide: Prior art search for code.

What you should do before filing

  1. Run a free patentability score on your core module — not just a README description.
  2. Document human design decisions (dates, benchmarks, rejected AI suggestions).
  3. Search prior art — our paid review includes 200-match deep search with overlap notes and extended report (up to 500 refs).
  4. Upgrade to Interactive Code Review ($69.95) for coached edits and Word exports.
  5. Take outputs to a patent attorney you choose for claim strategy and FTO if you plan to ship commercially. A vetted attorney directory is on our roadmap.

Common questions

Can you patent an algorithm?

Not a bare algorithm or formula, which courts treat as an abstract idea. A specific technical application of an algorithm that improves how a computer or system works can be patent-eligible.

Can you patent an app?

Not the app as a whole. You can patent a new technical method the app performs, protect the look of its interface with a design patent, and the code itself is covered by copyright.

How long do I have to file after I show my code publicly?

In the United States you have one year after your own public disclosure to file. Most other countries have no such grace period, so public disclosure first can cost you protection abroad.

Do I need a provisional patent application first?

No, it is optional. A provisional application secures a filing date for 12 months at lower cost, but you must file the full non-provisional application within those 12 months to keep that date.

If AI wrote some of your code

The same tests apply, and inventors still have to be people. Read the guide for your setup: code written with ChatGPT, code written with Claude, or a vibe-coded app. If you are unsure about rights to the code itself, see who owns AI-generated code. When you are close to filing, check your filing readiness.

What Patent PreCheck does not do

We do not provide legal advice, guarantee grant, or replace freedom-to-operate analysis. We help you prepare so attorney hours focus on claims — not basics.

Ready to score your code?

Get your free score →