I was told even when we cannot patent the code, there is a copyright or intellectual property on it. But what can we do with that? is that protecting from someone else using the code?

If yes, what are the legal tools to act on some site using that code?

Because I can also think in different scenarios:

  1. Javascript code, without modification: if some site is copying the code is easy to check, code is visible

  2. Javascript code, modified (minified, obfuscated, or some minor changes to the code)

  3. Backend code, without modification: in this case we don't have access to it, how can we know if they are using our code then?

  • You can sue people who violate your copyright, if they do that. How to identify copied code isn't really a legal question, though.
    – Ryan M
    Nov 14, 2020 at 12:44
  • 1
    Why is not legal? I mean is not a legal problem to define "when" some code is considered a copy or not? and is not a legal problem to define how to check if someone is violating copyright on code that is not visible in the browser (backend)?
    – Enrique
    Nov 14, 2020 at 13:31
  • No, "how do I find evidence that something has been copied?" is not a legal question. What you do with evidence of copyright violation is.
    – user4657
    Nov 15, 2020 at 10:18
  • @Nij why not? the law can give you some tools to get the evidence right? a search warrant for example
    – Enrique
    Nov 15, 2020 at 17:32
  • Getting a search warrant is not something you can do as a civilian, even mentioning it demonstrates you have misconceptions about what is part of the legal process and what is not. Once you have identified copied code, how to use that evidence on court is a legal question; the actual identification is technical and is not at all part of the legal process.
    – user4657
    Nov 15, 2020 at 19:26

2 Answers 2


What you can do with copyright protection is sue a person who infringes on that right. As a pre-lawyer step, you could file a DMCA notice with the service provider alleging infringement, which should get the stuff taken down, but the process is a bit formalistic and still boils down to filing an infringement lawsuit.

Then you have to provide evidence that it is most likely that your code was copied. It naturally depends on the nature of the code, but degree of similarity can be quantified, and a paid expert could testify that is is extremely unlikely that the similarity is by accident or is natural (e.g. the centigrade-to-farenheit conversion formula). This also holds for modifications. If you have a good reason to claim that they have infringed code in an invisible location, you can get a subpoena requiring them to provide you with a copy so that you can do your forensic analysis on that code.

  • Do you know about the price and times for for a demand like this? I mean not exactly, but is this something that only big companies can afford because usually takes too long and are too expensive?
    – Enrique
    Nov 14, 2020 at 21:18

Usually it is difficult and expensive to prove that your code is used somewhere else as pointed out in the answer from user6726. Sometimes it becomes obvious like here. It is especially difficult if your code is slightly modified or someone runs an obfuscator over it.

A simple trick you can do is the following: Modify some constants (e.g. pi or sqrt(2)) slightly which has no impact on your calculations but will probably not be changed by someone copying your code:

final double PI = 3.14159264359; 

Looks like pi but is wrong by 0.0000003 % and will most likely not be modified, and it usually still there after obfuscation.

At least you could now approach the copyright violator with a good proof.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.