I have a question about IP in freelancing. What types terms would you put in an IP agreement with a client to ensure that:

  • Any code you use from your own code base (convenience code or frameworks) remains your property and not the client's.

    • Further on this one: How do I even begin to define what's mine and what's newly generated IP for the purpose of the product. To exaggerate my point: why is a for-loop not their IP? How do I make it that a convenience script for displaying multiple images in a grid is also not their IP? Where and how should I draw the line?
  • Any third party open source code must be used in accordance with its respective licencing agreement.

I'm interested in answers from a strictly legal perspective, but also just as much, I'd like to know how you handle this in practice.

Maybe helpful note: I'm in data science and prototype software dev, so I lot of the code I use to develop a solution doesn't actually go into a final product. And I port over a lot of helper code from other personal projects or client projects. I never know how to define what's mine and what's theirs.

  • 1
    Couldn't you just upload your scripts to GitHub with the relevant license that suits you? Then it's like any other 3rd party library. Or include a list of 3rd party libraries, including yours along with the license terms with the project. Basically what I'm saying is apply a license to your code, then make sure its stated that those libraries are covered by a specific license
    – Dan Harris
    Feb 3, 2021 at 1:04
  • Thanks @DanHarris for the respones. Yes I could for a lot of it. Although there are parts which are more dynamic - tweaks I might come up with on the spot. Even though I cam up with it while doing the work for the client, it's still highly generic and stuff I would reuse later. Feb 3, 2021 at 8:28
  • IMO there is no need to justify nor prove anything. Just state that none of the code you supply can be reused in other contexts and all remains your property, except for parts explicitly designated. Of course, if you use third party components, you have to fulfill their own conditions of use, which usually include at least a copyright notice. I see no difficulty with that.
    – user4521
    May 2, 2023 at 12:47
  • You may find my answer here useful: What should I charge for a custom shirt builder web application?
    – HenryM
    Oct 21, 2023 at 22:06

2 Answers 2


Have a look at the Contract Killer contract, it has a provision on Intellectual Property which would be useful to you.

Intellectual property rights

You guarantee the written content you provide is original, or that you have the rights to use it. You also guarantee you have licences to use images which are owned by photographers or have been purchased from stock libraries. You agree to protect us from any claim by owners of copyrighted material. When our work requires licensed fonts or images from stock libraries, we’ll ask you to purchase them so you’ll be licensed to use them.We guarantee our work is original. When you’ve paid us in full—and if this contract hasn’t been terminated—we’ll assign intellectual property rights to you as follows:

You’ll own the graphic files we produce during your project. We’ll give you permission to use these files for any purpose.

We’ll own the unique combination of elements which constitute the complete design. We’ll license it to you, exclusively and in perpetuity, for this project only.

This should technically protect you and your code from reuse for purposes other than the intended project.

A previous version of this contract had text that worked better in my opinion.

Intellectual property rights

Just to be clear, “Intellectual property rights” means all patents, rights to inventions, copyright (including rights in software) and related rights, trademarks, service marks, get up and trade names, internet domain names, rights to goodwill or to sue for passing off, rights in designs, database rights, rights in confidential information (including know-how) and any other intellectual property rights, in each case whether registered or unregistered and including all applications (or rights to apply) for, and renewals or extensions of, such rights and all similar or equivalent rights or forms of protection which subsist or shall subsist now or in the future in any part of the world.

First, you guarantee that all elements of text, images or other artwork you provide are either owned by your good selves, or that you’ve permission to use them. When you provide text, images or other artwork to us, you agree to protect us from any claim by a third party that we’re using their intellectual property.

We guarantee that all elements of the work we deliver to you are either owned by us or we’ve obtained permission to provide them to you. When we provide text, images or other artwork to you, we agree to protect you from any claim by a third party that you’re using their intellectual property. Provided you’ve paid for the work and that this contract hasn’t been terminated, we’ll assign all intellectual property rights to you as follows:

You’ll own the website we design for you plus the visual elements that we create for it. We’ll give you source files and finished files and you should keep them somewhere safe as we’re not required to keep a copy. You own all intellectual property rights of text, images, site specification and data you provided, unless someone else owns them.

We’ll own any intellectual property rights we’ve developed prior to, or developed separately from this project and not paid for by you. We’ll own the unique combination of these elements that constitutes a complete design and we’ll license its use to you, exclusively and in perpetuity for this project only, unless we agree otherwise.

In the case of the above, your boiler code is developed prior to the development of the project, as such you only license the use of such code, and the code cannot be reused by the client without your written permission.

Regardless, I would always recommend you consult a lawyer who would be able to give you better advice.

Defining scope of what's yours or what's theirs In your particular case, I would convert your code and functions into a library, after which you could license the use of that library instead of embedding your code into the product. My knowledge about programming doesn't go beyond Web Development so if it were me, and I had some JavaScript functions that were unique to my work, I would bundle it up in a file or folder and license it exclusively to that project.

  • "Any code you use from your own code base": you can license the code instead of selling it. State it in the contract and/or sales terms*.

  • "what's mine and what's newly generated IP": you should know it while coding. If you just license the software (see above), there is no need to distinguish. If you plan to sell the new code, try to keep the files separate, or comment in the files.

  • "in accordance with its respective licensing agreement": this is a must. Make sure that you respect the terms of these respective licensing agreements. You may refer to them explicitly in your contract or just state that you respect them.

If the utilities, prototypes and other tools aren't required to use the software, and only served for your own work, you don't need to deliver them.

*When I deliver source code, I explicitly forbid the client to resell to third parties it but let him free to use it for his own purposes.

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.