Take the 2-minute tour ×

I have written code at home, on my own time and using my own knowledge and equipment, while under no contract or NDA. I want to make this code open source so that I can use it in software I write for an employer, without denying myself the right to use it at home or elsewhere later.

I'm not sure if saying it is in the "public domain" would fit this purpose, or if I need to find an open source license. I want anyone to be able to use the code in closed source proprietary software with zero requirements for including a license with the source or binary. And I want to minimize the risk of anyone being sued for using it. (I'm aware that one can never be 100% safe from being sued.)

Is there an open source license that fits this purpose? To what extent is what I want to do even possible?

I wouldn't mind putting the license in comments in the code files themselves, but that obviously doesn't go with the binary.

share|improve this question
Are you 100% tied to the idea of not having to include a license file? Because if you're not, the MIT license seems ideal opensource.org/licenses/mit-license.php –  Amy Anuszewski Jul 13 '11 at 19:23
That seemed like the best bet but I'd really like to let my employer distribute binaries using this code without distributing a special license for this code. –  Philip Jul 13 '11 at 19:24

7 Answers 7

up vote 7 down vote accepted

I am not a lawyer. MIT license. BSD. ZLib license.

But here's the thing, as author you own the Copyright and that gives you several options. Licenses are for other people who are not you, as owner you can license this code in many different ways to anyone you want. For example, while you maintain copyright you can license it in perpetuity to the company you work for.

It's up to the company to accept your license terms, or deny them. And it's up to the company to allow you to add code written against your code base back into the open source wild; many will not, you will have to ask and get it in writing.

share|improve this answer
Being lazy, I'd prefer not to try to get a specific license for my employer to use it. Ideally, I could make the code be such that anyone could use it for any purpose with no restrictions. I'm wondering to what extent this is possible. –  Philip Jul 13 '11 at 19:36

The BSD licenses are good for this sort of thing. It's basically the same as putting it in the public domain, but with a nice legal license to fall back on to prevent the whole "being sued" thing.

share|improve this answer
From that page: "Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution." Is "putting it in the public domain" possible, and if so does that help prevent someone from claiming the code and suing others who use it? –  Philip Jul 13 '11 at 19:33
@Philip you can license the code however you want. You could take the BSD license and remove that sentence from it. Traditional "public domain" means giving up copyright, and no one else can just take the copyright - similar to when a copyright expires. If you give up copyright you will never have any control over it again though. –  Jeremy Jul 13 '11 at 20:27
@Jeremy I suppose that's what I'll do use BSD or MIT and remove the license propagation requirement. And I found this, which I should have found originally and explains it well: stackoverflow.com/questions/219742 Thanks everyone. –  Philip Jul 13 '11 at 21:44
@Philip: The WTFPL mentioned in that question may in fact be the best option for you. –  Jan Hudec Nov 15 '11 at 9:17

The Boost License seems to fit your bill nicely. It is aproved by the OSI.

From the Rationale for this License:


  • Must be simple to read and understand.
  • Must grant permission without fee to copy, use and modify the software for any use (commercial and non-commercial).
  • Must require that the license appear with all copies [including redistributions] of the software source code.
  • Must not require that the license appear with executables or other binary uses of the library.
  • Must not require that the source code be available for execution or other binary uses of the library.
share|improve this answer

My advice is... discuss this with your employer.

My employer uses code that I had already written, and we agreed that I would license the code under the 2-clause BSD license and then give a copy to my employer. In practise, I simply added a header to each source file based on the BSD 2-Clause license template. That is the easy bit.

What happens with enhancements/fixes made to your code by the employer? When these are done by you? When these are done by another developer? In my case we agreed that I would not directly take improved source code, but I would be free to reimplement any changes in my own time, on my own hardware.

share|improve this answer

IANAL, but you should be able to use any of the open source licenses that are already out there for your purpose, as you didn't write it on company time, with company tools, or at the request of your employer, so it should be yours to do with as you please.

For your license needs, I'd check out the MIT or BSD licenses first, as they're the least restrictive other than Creative Commons. If those are too loose, then check out the GPL and Apache ones, or the one Mozilla uses (I think it's GPL, but don't remember off hand), as they're written more with the assumption that the software will just as likely be used commercially as non commercially.

Usually, the "don't sue me" part of the "this product is provided as is, with no warranty" disclaimer that's often toward the top of the license or in an otherwise prominent place in the documentation.

share|improve this answer
MIT, BSD and GPL which I've looked at all require distributing the license with the source or binaries. I want to be as little restrictive as possible. Now of course a company could be sued if they distributed software using this code and someone died because of it. I just want to minimize the chance of someone claiming the code is their own and suing others who use it. –  Philip Jul 13 '11 at 19:27
Distributing the license is kind of required for any license because people have to actually be aware of said license and its contents. It kind of defeats the purpose of the license to begin with if no one has access to it. –  Shauna Jul 13 '11 at 19:38
@Philip: I am not a lawyer, but I think you don't really have to distribute the MIT license with binaries linked to the application, because you can sublicense them under the license covering the application (which does have to be there anyway). –  Jan Hudec Nov 15 '11 at 9:02

So, it sounds like you need to copy the language of the MIT license and simply remove the requirement to include the license file with the code. This gives people to use the code in any way they see fit, but precludes any warranties.

Of course, I'm not a lawyer.

share|improve this answer

If you do bug fixes or enhancements to your code while doing work for hire, then, without some specific exemption in your work contract, your employer may end up with some rights over portions of the code (depending on your particular legal jurisdiction, yadayada, Ianal). Publishing your code under the Mozilla MPL or LGPL might require them to contribute this portion back to you/everybody in certain circumstances.

You might want to also put the code in some date stamped public repository to help prove it's existence before your work for hire.

share|improve this answer

Your Answer


