I've been working on a side project for fun that I originally wanted to release and commercialize. I've realized recently that while I think my work is great and would be fun to share I am not ready to commit to working on it full-time. I'm afraid that the work I've done is going to be for naught if I don't do anything with it.

I'm considering open sourcing the entire project so that others can learn from many aspects of it including code style, application structure, etc... but I'm worried that someone will take the ideas of my work and either patent it or use/fork it directly to commercialize it on their own.

I've been looking in to various licenses that would allow me to open-source this project so that the code can be analyzed by others for learning purposes, but it seems that all the licenses I've found allow for commercialization.

Is there any license that I can release the source under to allow learning and contributing but preventing others from commercializing what I've been working on?

Bonus points for follow-up - would releasing it under a license like this prevent me from also commercializing it later?

  • I've perused a lot of questions on here in relation to licensing and preventing commericialization and the standard answer that many give is something like if you don't want others to commercialize don't open source it so please keep in mind my question is very specific that I would like to only release the source so that others can learn from it.
    – PW Kad
    Apr 20, 2016 at 4:35

3 Answers 3


I am not a lawyer, but here are some comments:

No Open Source/Free Software license will allow you to disable commercial use of the code. (See OSI's FAQ and the GPL FAQ.) Open Source licenses protect users – with a non-commercial clause, in the case you would abandon the project or turn it against users, no one else could take the free version farther than a hobby.

There are licenses that block commercialization. The most popular are the Creative Commons NC varieties, but those are not suitable for code. Other such licenses were used for code (e.g. MS "Shared Source", old SciLab license). But don't expect help from the Open Source community when it comes to enforcing these. Your best bet might be to ask a lawyer to write a license that would suit you.

Anyway, consider that if anyone wanted to commercialize your code, it would be in their best interest to hire the person who originally wrote it :)

As for the follow-up: unless you explicitly transfer copyright to someone else, you can distribute your code under any license you like, even after you've released it under a different license. (But it must be your code, so if you include contributions from other people, you need to take into account what license these contributions were under.)

  • Cool, thanks for the answer. Going to spend some time reading the sources you've quoted, thanks a ton!
    – PW Kad
    Apr 20, 2016 at 15:48
  • And just to add to the followup, if you do re-release it, keep it mind you can't revoke what you've already released. So if you change your mind and commercialise it, someone who obtains a copy of the old code (or forks a copy and goes back to an old commit) can still use it under the old license.
    – Tim Malone
    Apr 28, 2016 at 9:44

While no FOSS license will explicitly forbid commercial use, there are licenses which make it sufficiently impractical to sell your work without putting in serious own work.

A strong copyleft license like the GNU General Public License allows everyone to use it however they see fit (including commercially) but with the caveat that whenever they give the program (or a program based on it) to someone else, they have to do that under the same license conditions. That means anyone who buys a copy can also sell copies or give them away for free. Most common software business models simply don't work under that condition.

Regarding patents: A patent can only be used to cover a new invention. You can not patent something someone else published before. This is called "Prior art". When I would try to patent an idea from your software, one would just have to point out that you published software with that idea before and the patent is invalid.


Many corporations have explicit rules against incorporating GPLv3 code into products they distribute. In addition, GPLv3 includes a grant of patent rights to any "essential claims" of someone distributing GPLv3 code. These provisions and lack of clarity about what code will be subject to "copyleft" obligations generally reduce the likelihood of someone using your code commerically if you release it under GPLv3. And if they do, you will get the benefit of their modifications under GPLv3.

If you really want no commercial use, then you could draft your own proprietary license that grants the specific rights you want to grant for non-profit and educational uses and prohibits commercial use outright. You would want to think through whether or not the non-commercial users get ownership of their derivative works and whether or not they should have to provide those derivative works to everyone else. This should not be difficult or expensive for a good licensing lawyer. Anyone seeking to use it commercially would need to ask your permission.

Because you feel strongly about how your code is used, whichever license you choose, you should register the copyright with the U.S. Copyright Office. It's not very difficult or expensive. Otherwise, it will be harder to get anyone to comply with your license.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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