Who Owns the Code? Work-for-Hire and IP Clauses Explained for Freelance Developers
You write the code, the client pays for it, and the contract says the client “owns all work product”. Simple, right? Not quite. Who owns software after a freelance project depends on three things: what the law says by default, what the contract actually transfers, and when it transfers.
Get this wrong and you can lose more than one project. A broad clause can hand over the libraries, snippets and tools you reuse on every job.
The default: the author owns the code
In the US, copyright belongs to the author of a work from the moment it is created (17 U.S.C. § 201). When you write code as an independent contractor, you are the author. The client only becomes the owner in two ways:
-
The code counts as a work made for hire, or
-
You transfer the copyright to the client in a signed written document.
Canada works in a similar way. Under the Copyright Act, section 13, the author owns copyright unless the work was made by an employee in the course of employment, and an assignment is only valid if it is in writing and signed.
Why “work made for hire” often does not fit custom software
Many contracts simply label everything a “work made for hire”. For employees, that works. For independent contractors, US law is narrower. Under the definition in 17 U.S.C. § 101, commissioned work by a contractor only counts as work made for hire if:
-
it falls into one of nine listed categories: a contribution to a collective work, part of a motion picture or other audiovisual work, a translation, a supplementary work, a compilation, an instructional text, a test, answer material for a test, or an atlas; and
-
both sides agree in a written document they both sign that it is a work made for hire.
A custom web app or API backend usually is not in that list. That is why most client contracts add a backup line: “to the extent any work is not a work made for hire, Contractor hereby assigns all rights to Client.” That assignment is what actually moves ownership, because a transfer of copyright must be in a signed writing (17 U.S.C. § 204(a)).
So the real negotiation is not about the label. It is about what you assign and when.
Three IP clauses to read twice
1. Assignment “upon creation”. Wording like “Contractor hereby assigns all rights in the Work Product as it is created” transfers ownership before you are paid. If the client stops paying halfway, it may already own everything you built.
2. Pre-existing tools and know-how. Look for “all work product, including any tools, libraries, methods and know-how used in performing the Services”. That can sweep in your own boilerplate, internal libraries and reusable components, which you need for your next client.
3. Future inventions. Some contracts claim anything “conceived during the term” or “related to Client’s business”, even if you built it on your own time for someone else. That reaches well beyond the project you are being paid for.
Also check that the contract does not ask you to transfer things you cannot transfer, such as open-source packages under their own licences or third-party assets you licensed.
What a fair IP clause looks like
Most clients do not actually need your toolbox. They need to own the product they paid for and to use it without worry. A fair clause gives them that and protects you:
-
Ownership passes on full payment. The assignment takes effect when the related invoices are paid in full.
-
Your background IP stays yours. Anything you created before the project, or outside it, remains yours. The client gets a permanent licence to use whatever of it is built into the deliverables.
-
Scope is limited to the deliverables. No claim on unrelated work or future ideas.
-
Portfolio rights. You may show the work in your portfolio, unless it is confidential.
Wording you can copy
Original clause:
All Work Product, including any pre-existing materials, tools and know-how used by Contractor, shall be a work made for hire and the sole property of Client upon creation.
Suggested replacement:
Upon Client’s payment in full of all amounts due for the Deliverables, Contractor assigns to Client all rights in the Deliverables created specifically for Client under this Agreement. Contractor retains all rights in materials it owned or developed before or independently of this Agreement (“Background IP”) and grants Client a non-exclusive, perpetual, royalty-free licence to use any Background IP incorporated in the Deliverables. Third-party and open-source components remain subject to their own licences.
It helps to attach a short list of your Background IP, such as your starter kit or internal component library, so there is no argument later.
An email you can send
Hi [Name],
Thanks for the agreement. One request on the IP section: I’m happy for [Company] to own everything I build specifically for this project once it’s paid for. I’d like to keep my own pre-existing code and tools, with a permanent licence for you to use any of it that ends up in the product. This is how I work with all clients, and it keeps my rates lower because I’m not rebuilding the basics each time. Would that work for you?
Thanks, [Your name]
A note for Canada and for designers
In Canada, authors also have moral rights, such as the right to be credited. Under section 14.1 of the Copyright Act these cannot be assigned, but they can be waived. A blanket waiver gives them up entirely, so consider limiting it, for example to changes the client needs to make for normal use. In the US, moral rights are narrow and mainly cover certain works of visual art, so they matter more for designers than for most code.
Check the whole contract before you sign
IP clauses often sit next to other risks, such as slow payment terms and unlimited liability. See our guides on negotiating Net-30 payment terms and unlimited liability clauses.
Redveto reads a client contract from your side. It flags IP clauses that transfer ownership before payment or claim your pre-existing tools, suggests fairer wording, and drafts a polite email to the client. You can see a sample report first, or run a single audit for $19.
Redveto provides automated risk analysis, not legal advice. Laws differ by state, province and country; have a qualified lawyer review any contract before you sign it.