I'm a developer of open source applications and publish my applications and smaller source code snippets on my personal website. I also often find and use code by others, often from blogs or small websites that just display a few lines of clever code, or offer a few source files for download. Most of the time, no licence is attached to these snippets and downloads.

So my question is, when I'm publishing such snippets or modules, do I need to declare a licence for them? If I do, it would probably be the 2-clause BSD or the MIT licence or something similar.

I've found an article about making those shorter and wondered whether such a licence is any good at all. Copyright always applies if declared. There's no need to require to accept that. Liability should never apply, I guess, but I have no idea about that. I mean, if I publish any piece of information on the web, or anywhere, and somebody uses it and that causes damage to them, can I be liable for that?

I like the idea of a very short authorship and permissions declaration like the following:

Copyright 2015, My Name, http://​my.website
Redistribution and use in source and binary forms, with or without modification, are permitted.

Would that work?

  • 1
    Note: everybody knows the MIT X11 License, the 2-clause BSD License, the GPLv2, GPLv3, LGPLv2, LGPLv3, AGPLv2, AGPLv3, ASL 2.0, MPL, CPL, and a couple of others. Even if you choose to use one of those, and yes, they are slightly long, your users won't actually have to read them, since they have already read them numerous times on other projects. Jan 26, 2015 at 0:17

2 Answers 2


It is not a great idea to write a license by yourself. Even if its wordings would be absolutely correct, people might be in doubt about it validity.

The shortest free software license I met, that is considered valid by some authoritative organization is GNU All-Permissive License:

Copyright <year> <name>

Copying and distribution of this file, with or without modification,
are permitted in any medium without royalty provided the copyright
notice and this notice are preserved.  This file is offered as-is,
without any warranty.

You might consider using it.


It's always better to have some sort of license, even if it's as simple as your example.

Code without a license cannot be assumed to be in the public domain. The author of the code always has an implicit copyright, at least in the United States, and if the author hasn't stated any permissions... well, then you don't have permission.

Even if the author has explicitly put their code in the public domain, the notion of "public domain" is a gray area in some countries.

  • 3
    In Germany, the only way to put something in the public domain is to commit suicide and wait 70 years. Not exactly practical. Jan 26, 2015 at 0:15

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