I want to add a copyright disclaimer in all my code/scripts (i.e. not software), which I share in my website. These are for many languages, like Matlab, R, Stata, Julia, etc.

Which license should I use? GNU GPL or CC-0?

(The GNU GPL license seems to be the standard, but it mentions the word "software". I don't think a script classifies as software, and so it feels a bit odd to have it there.)

  • Are you OK or not with someone taking your stuff and modifying it and distributing it in some obfuscated form without showing the source to anyone? We can't answer if you don't tell us. Mar 24 '17 at 11:28
  • Yes, that is fine for me. Does that mean a CC0 license is better?
    – luchonacho
    Mar 24 '17 at 14:05
  • Yes, if that's fine for you, then choose CC0, it allows people to do that. Mar 25 '17 at 14:26

From the Wiktionary definition of software:

Encoded computer instructions, usually modifiable (unless stored in some form of unalterable memory such as ROM).

So yes, scripts obviously classify as software.

Now, if the only difference to you between GPL and CC-0 is the one you described, then you have a lot to learn.

In short, GPL used indeed to be the standard. It is not really the standard anymore, just one of the most common choices. MIT is also a very common choice. These two licenses are very different in what they allow, with MIT one of the most permissive and GPL one of the most restrictive. Apache 2.0 is also a common choice (see some recommendations here: http://choosealicense.com/).

For short scripts, GPL is generally not recommended (even by the FSF):

What if the work is not very long? (#WhatIfWorkIsShort)

If a whole software package contains very little code—less than 300 lines is the benchmark we use—you may as well use a lax permissive license for it, rather than a copyleft license like the GNU GPL. (Unless, that is, the code is specially important.) We recommend the Apache License 2.0 for such cases.

My preference for very short scripts goes to CC-0 because I want people to be able to reuse them in every way they want, without needing to attribute me. If this is also what you want, then go ahead and apply CC-0 to your work as detailed here: https://creativecommons.org/choose/zero/


CC by 0 means Creative Commons which any person can use/share/edit the script without providing a link (attribution) to you. Whereas with the GNU GPL it is not the case.

If you want the credit, you can use CC-BY-SA or MIT. Many libraries like jQuery use MIT License.

  • Why is GNU GPL not the case? Which is the difference?
    – luchonacho
    Mar 23 '17 at 9:57
  • @luchonacho CC0 allows reuse without attribution. The GPL requires attribution.
    – apsillers
    Mar 23 '17 at 20:49

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