I have invented a new algorithm that I want to patent in Germany/Europe. However, I have kept my code implementing the algorithm in a public GitHub repository. I have not assigned a copyright license to it. The question is, can I patent this algorithm now? or does keeping it in a public repository invalidate any patent applications?

2 Answers 2


If you are applying in Europe via the EPO you have to contend with their definition of “made available to the public.” In section G IV we find

6.4 Internet disclosures As a matter of principle, disclosures on the internet form part of the prior art. Information disclosed on the internet or in online databases is considered to be publicly available as of the date the information was publicly posted.

  • Thanks, that is really clear. Jan 22, 2022 at 10:03

In general code itself is protected by copyright not patents. However, you may potentially get a patent on an algorithm as applied to specific task or problem. The mathematical algorithm by itself will almost assuredly be considered abstract and thus unpatentable. My understanding is that algorithm based patents are hard to obtain in Europe, but I'm not an expert.

By publishing your code, you make it prior art and thus your algorithm is unpatentable. In the US there is a 12 month grace period so depending on when you uploaded it to Github you might still be able to pursue a patent there. It's possible if you delete the Github repository it might not be discovered by the patent office, but you are probably out of luck.

I am not a lawyer and this is not legal advice. It would be best to consult with an actual patent attorney.

  • If a person is accused of murder they can tell their lawyer they did it and the lawyer can’t tell anyone. If the same person wants to hide a relevant fact about their invention being available on GitHub and tells their patent practitioner, the patent practitioner is required to tell the USPTO.
    – George White
    Jan 15, 2022 at 17:22
  • @GeorgeWhite I wasn’t suggesting it was a legitimate thing to do. That said, some random GitHub repository may well have never been visited by anyone other than the owner. If GitHub has tools to confirm that, it might be somewhat more ethical to remove the repository.
    – Eric S
    Jan 15, 2022 at 19:15
  • Nothing wrong with removing it as long as it is all disclosed. If you disclosed on an IDS that the material was theoretically available to the public you would avoid inequitable conduct and would have complied with the duty of candor and disclosure to the USPTO. You might be able to establish that it was never actually acceded. However there are famous cases where something was available to the public but proven to not ever have been accessed by anyone in the public and where the inventors lost out. One regarding a stay in the inventor’s fiancées garment and one involving a car part.
    – George White
    Jan 15, 2022 at 19:57
  • @GeorgeWhite That is really helpful. Perhaps you might add an answer. Is that also true in Europe where the OP wants to patent?
    – Eric S
    Jan 15, 2022 at 20:01
  • Yes my comment was a US comment. Most places have no duty to disclose or have anything like an IDS but I’ll think about a more full answer
    – George White
    Jan 15, 2022 at 20:19

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .