Who Owns the Code: Freelance Developers and Client IP
By Mark Fulton · · 13 min read
Last verified:

Paying a freelance developer does not, by itself, move the copyright in the code to the client. In the US the person who writes the code is ordinarily the author and the owner, and ownership changes hands only through a signed written transfer or a narrow "work made for hire" arrangement that most freelance software does not fit. That is good news for you as the developer, because it means you decide when the client becomes the owner. The clean way to do it is an assignment clause that takes effect on final payment, paired with a carve-out that keeps your pre-existing tools. Both clauses are below, with a plain-English gloss under each.
Most of what you will find on this question is written for the client: how to make sure you own what you paid for. That is a fair question, but it leaves out the person delivering the work. You are the one who holds the leverage, the one whose reusable tooling is at risk, and the one whose unpaid invoice gets harder to collect if the contract hands over ownership too early.
This is general information for freelance developers, not legal advice. Copyright law varies by country, and the wording here is a starting point for a conversation with a lawyer, not a substitute for one.
Does the client own the code just because they paid for it?
No. Payment and ownership are two separate things, and the law only connects them if your contract does.
The US Copyright Office puts the default plainly in its circular on works made for hire: ordinarily, "the author is the person or persons who actually created the work." The exception, work made for hire, is where the party that hired you is treated as the author instead. If your project does not fall under that exception, the author is you.
Moving ownership from you to someone else is a transfer, and the statute is specific about how that works. Under 17 U.S.C. section 204(a), a transfer of copyright ownership "is not valid unless an instrument of conveyance, or a note or memorandum of the transfer, is in writing and signed by the owner of the rights conveyed." So the client does not become the owner through a handshake, a Slack message saying "it's all yours", or a paid invoice. They become the owner when you sign something that says they are.
What the client does get without any paper is the ability to use what they bought. Nobody pays $12,000 for a web app and then cannot run it. That practical permission to use the finished product is a different thing from owning the copyright, and the difference shows up later: whether they can hand the codebase to a different agency, sell it with the company, or stop you from reusing parts of it.
This is also where many freelance relationships quietly sit for years. Nothing was signed, the code works, and everyone assumes the client owns it. It tends to surface at the worst time, during a funding round, an acquisition, or a falling out, when somebody's lawyer asks for the assignment and there is none.
What does "work made for hire" actually do for a freelancer?
Less than most contracts assume. A lot of client templates include a line like "all work product shall be considered a work made for hire." It sounds like it settles ownership. For a freelance developer it usually does not.
The Copyright Office circular says a work is made for hire in two situations:
- An employee created it within the scope of employment. If you are a true employee, your employer owns your code. A freelancer is generally not an employee. The Copyright Office circular says the Supreme Court read these terms through general agency law and lists the questions that matter: who provides the tools and workspace, how long the relationship lasts, whether the hiring party can assign you other projects and control when and how long you work, how you are paid, whether benefits or tax withholding are involved, and whether you run your own business and can hire helpers. A freelance developer with their own laptop, their own clients, their own hours and a 1099 looks like an independent contractor on nearly every one of those.
- A commissioned work in one of nine listed categories, with a signed writing. The circular lists them: 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. The parties must also expressly agree in a written instrument signed by them that the work is a work made for hire.
Read that list again. A web application, an API, a mobile app, a script, a plugin: none of them is named. The circular says that if a work fails any of the requirements, "it is not a work made for hire." Some pieces of a software project can arguably fit a category, such as instructional text in the documentation, or audiovisual material inside a product. But the core code of a typical freelance build is not obviously on the list, which is why clauses that rely only on the "work made for hire" label are a weak way to transfer ownership.
That is not an invitation to be difficult. It is a reason to prefer a direct assignment, because an assignment does not depend on squeezing your code into a category. It also has a side effect that matters to you. The circular notes that copyright term and termination rights differ for works made for hire, and that author termination rights do not apply to them. If you assign rather than work for hire, those differences remain in play. Ask a lawyer how that applies to your situation if the project is large.
So if a client sends you paper that says "work made for hire" and nothing else, you have two reasonable moves. Ask them to add an assignment clause as a backstop, or replace the whole thing with your own. Either way, the wording that does the work is the assignment.
What should an IP assignment clause say?
An assignment clause has four jobs: say what is being transferred, say who transfers it, say when, and say what is not included. Most templates do the first two and forget the last two.
Here is what each part needs.
What. "The deliverables" defined in your statement of work, not "all work product" in some open-ended sense. If the SOW lists a Next.js marketing site and a contact form, the assignment covers those, not everything you ever touched during the engagement. The statement of work guide covers how to define deliverables tightly enough that this clause has something concrete to point at.
Who. You, as the author, assigning to the named client entity. Not "the client" in general. If the client is "Northline Ltd", the assignee is Northline Ltd.
When. This is the part that gets its own section below. The short version: on payment in full, not on creation or delivery.
What is excluded. Your pre-existing tools, your general libraries, and any third-party components, none of which you can or should hand over.
Copy-paste clause pair
Below is the clause pair. Put clause A and clause B next to each other in the intellectual property section of your contract, and adjust the bracketed parts. Read the gloss under each one before you change a word.
Clause A. Assignment on final payment. Developer retains all right, title, and interest in the Deliverables until Developer has received payment in full of all amounts due under this Agreement and the applicable Statement of Work. On receipt of that payment in full, Developer assigns to Client all right, title, and interest in the Deliverables, excluding the Developer Tools described in Clause B. Until that time, Client may use the Deliverables only for internal review and testing, and may not deploy them to production, modify them, or distribute them. Developer will confirm the assignment in a signed writing within [5] business days of Client's request after final payment.
Gloss on Clause A. The client does not own the code until the last invoice is paid. That keeps your leverage intact for the whole project: the unpaid invoice is tied to something the client wants. "Payment in full of all amounts due" matters, because a clause that says "payment of the final invoice" can be argued to be satisfied when they pay only that invoice and not the earlier ones. The internal-review sentence stops the client from shipping to production on unpaid work, while still letting them see a staging build. The last sentence is practical: a lender or acquirer will want a signed document, and this commits you to provide one quickly after you have been paid. This lines up with the written, signed form the statute asks for.
Clause B. Developer Tools carve-out. "Developer Tools" means any software, libraries, frameworks, templates, scripts, configurations, and know-how that Developer created or acquired before the start of this Agreement, or develops independently of the Deliverables during it, together with any improvements to them that are not specific to Client's business, and any third-party or open source components. Developer Tools are not assigned to Client. To the extent a Developer Tool is incorporated into the Deliverables, Developer grants Client a perpetual, worldwide, non-exclusive, royalty-free license to use, copy, and modify it as part of the Deliverables. Developer remains free to use the Developer Tools and general skills and knowledge for other clients.
Gloss on Clause B. This is the sentence that lets you keep working. Without it, a broad assignment can sweep in the auth boilerplate, the deploy scripts, and the component library you built over five years, simply because they ended up in the client's repo. The license is what makes the carve-out acceptable to the client: they get to keep running and modifying the product with those pieces inside it, so nothing breaks for them, but you still own the pieces. Naming "third-party or open source components" is honest as well as protective, since you cannot assign rights you never had. "Improvements not specific to Client's business" covers the case where you make your own boilerplate better during their project.
If a client pushes back on Clause B, the usual middle ground is to list the major Developer Tools by name in an appendix, which makes the carve-out concrete for them and clean for you.
Why tie the transfer to final payment?
Because it is the only point in the project where the client has a reason to pay quickly and you have something to withhold.
Compare the two ways the clause can be written. If ownership transfers on creation or on delivery, then the moment you push to their repository the client owns the work, and a late invoice is an ordinary debt with nothing attached. If ownership transfers on final payment, the client who stops paying does not own the code, and using it in production without permission is a much stronger conversation than a payment reminder.
Neither is a threat to make lightly, and you should not expect to use it often. The point is that the structure aligns the incentives from day one. Clients who intend to pay do not notice the clause. Clients who do not intend to pay find out early that the leverage sits with you.
The same thinking applies to how you invoice. The final invoice is the trigger, which means it needs to be unambiguous: one invoice, one total, an explicit reference to the SOW, and a line that says "final payment, triggers assignment under clause 5." The freelance contract payment terms guide covers where this clause sits among net terms, deposits and late fees, and what belongs on a software development invoice covers the line items.
A practical wrinkle: tie the transfer to payment in full of all amounts due, as in Clause A, not to a specific invoice number. Milestone projects have several invoices, and a client who pays the last one first has not completed the payment obligation.
What do you keep when you deliver?
Quite a lot, if you write it down.
- Your pre-existing tools and libraries. Anything you built before the engagement, and anything you build alongside it that is not specific to the client, stays with you under Clause B.
- Your general skills and knowledge. No contract can reasonably stop you from using what you know. Say so explicitly, as Clause B does.
- Third-party and open source components. These are never yours to assign. They arrive with their own licenses. List the significant ones in a handover note so the client knows what they are inheriting.
- Your portfolio rights. If you want to show the work, ask for it in writing. A short sentence does it: "Developer may describe the project and show non-confidential screenshots in a professional portfolio." Many clients say yes. Some will say no, and then you know before you start rather than after.
- Your invoice. Nothing in the assignment cancels the money owed. Assignment on final payment means the invoice gets paid first. If you are still working out how to structure that invoice, how to invoice as a freelance developer walks through it.
What you give up, deliberately and for money, is the project-specific code: the business logic written for this client, their data model, their interface. After assignment, that belongs to them. Reusing it for another client would be copying someone else's property.
Where the final invoice fits
The assignment clause only works if the trigger is clean. A final invoice that mixes retainer hours, a late fee, and a disputed change order gives the client an excuse to pay part of it and call the project closed. Keep the final invoice to the amounts due under the SOW, send it with the handover note, and make the payment date visible so you know when to send the signed assignment.
If you need that invoice quickly, generate it free in the billable.dev invoice generator: no account, and the data stays in your browser.
FAQ
Can I reuse code I wrote for a past client?
It depends on what the contract said and what you are reusing. Project-specific code that you assigned to the client belongs to them, so copying it into another client's project is a problem. Code that falls under your Developer Tools carve-out, and general techniques you learned, are yours to reuse. This is exactly why Clause B exists. If you signed a client's template that has no carve-out, read it carefully before reusing anything, and consider asking a lawyer.
Does a verbal agreement transfer ownership?
Not for copyright ownership. The statute says a transfer of copyright ownership is not valid unless it is in writing and signed by the owner of the rights conveyed. A verbal agreement may still matter for other purposes, such as showing the client had your permission to use the work, but ownership needs a signed writing. If you want to give a client ownership, put it on paper. If you do not, do not sign something that says so.
What happens to open source libraries inside the project?
They keep their own licenses, and you cannot assign rights in them because you do not own them. Treat them as a separate category: list the main ones in your handover note, make sure the licenses are compatible with how the client plans to use the product, and carve them out of the assignment as Clause B does. If a license has terms that might affect the client's plans, tell them in writing before delivery rather than after.
Can I put client work in my portfolio?
Only if the contract allows it or the client agrees in writing, because once ownership transfers, the work is theirs and so is the decision about showing it. Ask for portfolio rights when you negotiate the IP clause. A one-sentence permission covers it, and you can limit it to screenshots and a description without code or confidential data.
This article is general information for freelance developers, not legal advice. Copyright and contract law vary by jurisdiction, and the clauses above are illustrative starting points. The US Copyright Office's Circular 30 on works made for hire (revised August 2024) is the primary source for the work made for hire points here. Have a lawyer in your jurisdiction review your IP clause before you rely on it.