The short answer
What this means for you
By default, the agency or freelancer who writes the code owns the copyright, not the client who pays for it. Employers own code written by employees, but an outside developer keeps ownership in the US, UK, Germany, France, Spain, Italy and India unless a written agreement transfers the rights. In the US, commissioned software usually cannot be a work made for hire, so you need a signed assignment under 17 U.S.C. 204(a). Get the assignment, the repositories and the accounts in writing before final payment.
- Paying for software does not transfer copyright; the author owns it until a signed written transfer (17 U.S.C. 204(a), CDPA s.90(3), India s.19(1)).
- Employee code belongs to the employer in every jurisdiction covered; Directive 2009/24/EC Article 2(3) sets that rule across the EU.
- Germany grants rights of use (Nutzungsrechte) instead of transferring copyright (UrhG sections 29 and 31(5)).
- With no stated term, assignments default to five years in Spain and India; with no stated territory, to the country where the assignment is made (Spain) or India.
- The US Copyright Office (January 2025) protects AI output only where a human determined sufficient expressive elements.
Who owns the code when you hire an agency or a freelancer?
Copyright in code belongs to its author, so an outside agency or freelancer keeps it until a signed written transfer, while an employer owns code its own employees write. In the US, 17 U.S.C. 201(a) vests copyright in the author and 17 U.S.C. 204(a) requires a signed writing to transfer it. A work made for hire, meaning a work the law treats as authored by the employer or commissioning party, covers employees but usually not commissioned software. In the UK, CDPA 1988 section 11 makes the author or employer the first owner, and section 90(3) requires a signed written assignment.[1][2][5][6]
This guide covers the United States, the United Kingdom, the EU baseline, Germany, France, Spain, Italy and India, and excludes other countries such as Canada and Australia. It is general information as of 23 November 2026, drawn from statute texts on official sites, and it is not legal advice. Ownership turns on contract wording and governing law, so have a lawyer in the relevant country review your agreement.
What are the default code ownership rules by country?
Commissioned code stays with the developer in all eight jurisdictions below unless the rights are transferred in writing, while employee code goes to the employer. The EU harmonises only the employee rule: Article 2(3) of Directive 2009/24/EC gives the employer all economic rights in programs employees create, unless the contract says otherwise, and leaves commissioned programs to national law.[7][11][12][13][14][15]
Germany works differently because copyright itself cannot be transferred (UrhG section 29). Clients instead receive rights of use (Nutzungsrechte), meaning licences to use the work in defined ways, simple or exclusive. Under section 31(5), uses the contract does not list are limited to what the contract's purpose requires, and section 69b gives employers, but not clients of freelancers, the economic rights in employee programs.[10][9][8]
| Jurisdiction | Code written by employees | Code from an agency or freelancer | How to transfer rights |
|---|---|---|---|
| United States | Employer is the author: work made for hire (17 U.S.C. 101, 201(b)) | Developer owns it; software is not one of the nine commissioned work-for-hire categories | Written instrument signed by the owner (17 U.S.C. 204(a)) |
| United Kingdom | Employer is first owner, subject to agreement (CDPA s.11(2)) | Author keeps copyright; client may get only an implied licence (UK IPO) | Assignment in writing signed by the assignor (CDPA s.90(3)) |
| EU baseline | Employer exercises all economic rights unless contract says otherwise (Directive 2009/24/EC art. 2(3)) | Not harmonised; national law applies | National law |
| Germany | Employer exclusively holds economic rights (UrhG section 69b) | Developer keeps rights; copyright itself is not transferable (section 29) | Grant of rights of use; unlisted uses limited to contract purpose (section 31(5)) |
| France | Economic rights vest in the employer (CPI L113-9) | Developer keeps rights unless assigned | Each right mentioned separately, with scope, purpose, place and duration (CPI L131-3) |
| Spain | Employer holds exploitation rights in source and object code (LPI art. 97.4) | Developer keeps rights unless assigned | In writing (art. 45); no duration means 5 years, no territory means the country where the assignment is made (art. 43) |
| Italy | Employer holds exclusive economic rights (L. 633/1941 art. 12-bis) | Developer keeps rights unless transferred | Transfer must be proven in writing (art. 110) |
| India | Employer is first owner under a contract of service (Copyright Act s.17(c)) | Developer owns it; s.17(b) covers photos, portraits and films, not software | Signed writing (s.19(1)); no duration means 5 years, no territory means India (s.19(5), (6)) |
Does paying for an app mean you own the code?
Paying for an app gives you the deliverable and, at most, an implied right to use it; copyright stays with the author until a written transfer. The UK Intellectual Property Office says a freelancer under a contract for services usually retains copyright unless the contract says otherwise, and that a commissioner may get only an implied, limited, non-exclusive licence for the intended purpose. That licence may not cover selling the product or hiring another developer to change it.[4]
The US trap is the phrase work made for hire. US Copyright Office Circular 30 explains that a commissioned work qualifies only if it falls within one of nine categories, such as a translation, a compilation or an atlas, and both parties sign a written agreement saying so. Computer programs are not on the list, so a contractor agreement that only calls the code work made for hire can fail and leave the developer as owner. Our view: relying on work-made-for-hire wording alone is the most common failure we look for when reviewing a development contract, and a backup assignment clause fixes it.[2][1]
Some countries read vague transfers narrowly. Spain's Intellectual Property Law, Article 43, limits a transfer to the exploitation methods expressly listed; with no stated term it lasts five years, and with no stated territory it covers only the country where the assignment is made. India's Copyright Act section 19 defaults to five years and to India, and an assignment lapses if the rights are not exercised within one year unless it says otherwise.[12][15]
What changes who owns the code?
Our view: Six factors change the default answer: an assignment clause, the payment condition attached to it, pre-existing code the agency brings, open-source code, third-party assets, and AI-generated code. Each needs its own clause, because a single line saying the client owns everything leaves gaps around reused libraries, dependencies and paid assets.
- Assignment clause: a present-tense transfer (the developer hereby assigns) of all rights in the deliverables, signed by both parties, with a duty to sign confirmations later.
- Payment condition: assignment on payment is fair, but define what happens to partly paid work and get at least a licence to work already paid for.
- Pre-existing IP: agency libraries and starter kits usually stay the agency's, licensed to you perpetually, royalty-free, modifiable and transferable.
- Open-source code: you use dependencies under their licences; flag copyleft licences such as GPL or AGPL early if you will distribute the app.
- Third-party assets: fonts, images, UI kits and SDK licences should be bought in your name or be transferable to you.
- AI-generated code: require disclosure of AI tool use and the same licence checks as for copied code.
Who owns AI-generated code written with tools like ChatGPT or Claude?
The US Copyright Office's Part 2 report on copyrightability, released on 29 January 2025, concludes that AI outputs are protected only where a human author has determined sufficient expressive elements. Prompts alone are not enough, while human arrangement or modification of AI output, and human-authored work perceptible in it, can be protected.[3]
Company claim: AI vendors assign whatever rights they hold to the user. OpenAI's Terms of Use, effective 1 January 2026, say users own the output and OpenAI assigns its rights, if any, noting that output may not be unique. Anthropic's Commercial Terms, dated 17 June 2025, say the customer owns its outputs, with Anthropic's rights, if any, assigned subject to the terms.[16][17]
Our view: A vendor's assignment cannot create copyright that the law does not grant, so a codebase written largely by AI with little human shaping may have thin copyright protection. For AI-assisted code, our view is to rely on the contract, repository control and trade secret protection rather than copyright alone.[3]
What should a software development contract say about code ownership?
A development contract should settle ownership in eight clauses, listed in the table. We check the first four before anything else, because they decide whether you can keep running the product if the relationship ends. Pair them with the payment and change-control terms in our guide to fixed price and time and materials contracts.
| Clause | What it should say | Why it matters |
|---|---|---|
| Assignment | Present assignment of all rights in deliverables, including source code, designs and documentation, signed by both parties | Meets writing and signature rules |
| Timing | Assignment on payment of each milestone, not only on final payment | Protects you if the project stops |
| Licence back | Agency keeps its pre-existing tools, licensed to you perpetually, royalty-free, modifiable and transferable | Lets you change suppliers or sell the company |
| Repositories and accounts | Code repository, cloud, domain, app store and analytics accounts created in your name, with the agency added as a user | Ownership is useless without access |
| Open-source register | List of dependencies and licences delivered with each release | Avoids copyleft surprises in due diligence |
| Third-party licences | Paid assets and SDK licences bought in your name or assigned to you | Prevents takedowns after handover |
| AI tool use | Disclosure of AI coding tools, no confidential data in non-approved tools, same licence checks for generated code | Contract terms carry the weight where copyright is thin |
| Documentation and credentials | Setup guide, architecture notes, environment variables and secrets handed over through a password manager | Lets a new team run and deploy the code |
What must an IP assignment clause say in each country?
Our view: An assignment clause must meet the formality rules of the governing law, and those rules differ by country. The illustrative skeleton below shows the usual parts; the table shows what each jurisdiction adds.
Illustrative skeleton: (1) The Developer hereby assigns to the Client, with full title guarantee, all present and future copyright and other intellectual property rights in the Deliverables, including source code, object code, designs and documentation, worldwide, for the full term of those rights. (2) Assignment of each milestone's Deliverables takes effect on payment of that milestone's invoice. (3) Pre-existing Materials remain the Developer's and are licensed to the Client on a perpetual, irrevocable, royalty-free, transferable licence that permits modification. (4) The Developer will sign any further document needed to confirm or register the assignment. (5) The Developer waives, or agrees not to assert, moral rights to the extent the governing law allows.
| Jurisdiction | What the clause must say | Legal basis |
|---|---|---|
| United States | A written, signed assignment, used as a backup to any work-for-hire wording, because software is not a commissioned work-for-hire category | 17 U.S.C. 101, 204(a); Circular 30 |
| United Kingdom | A written assignment signed by or on behalf of the developer | CDPA 1988 s.90(3) |
| Germany | Exclusive rights of use, each type listed, including adaptation (Bearbeitung), sublicensing and online use, since unlisted uses fall back to the contract purpose | UrhG sections 29, 31(5) |
| France | Each right listed separately, with its domain defined by extent, purpose, place and duration | CPI L131-3 |
| Spain | Written assignment listing each exploitation method, the term and the territory; otherwise 5 years and the country where the assignment is made | LPI arts. 43, 45 |
| Italy | Written document, because a transfer must be proven in writing | L. 633/1941 art. 110 |
| India | Written and signed, identifying the work, rights, territory and duration; otherwise 5 years and India only, and rights unused for one year lapse unless the assignment says otherwise | Copyright Act 1957 s.19(1), (4)-(6) |
Worked example: a startup hires an overseas freelancer (illustrative)
Our view: Illustrative scenario: a US startup hires a freelance developer in India and pays every invoice, but the only written term is an email calling the code work made for hire. Software is not a US commissioned work-for-hire category, and under India's section 17(c) the freelancer is not an employee, so the freelancer remains the first owner. Even read as an assignment, the email would last five years and cover only India under section 19. A signed worldwide assignment for the full term, a governing law clause and a repository transfer close those gaps.[2][15]
How do we audit code ownership when taking over a project?
Our view: When we take over a codebase, we first check git log authorship, who owns the GitHub organization, the App Store Connect and Google Play Console account holder, the domain registrar, and whether a signed assignment exists for each contributor. That order matters: git history tells us who wrote the code and therefore whose signature an assignment needs, and the account checks tell us whether the client can deploy without anyone else's permission.
We score each item in the table as pass, partial or fail. Any fail on assignments, the repository organization or the app store account holder is a blocker we resolve before new feature work, because each of those can stop a release or a sale. A partial, such as an admin who has left but whose access was never removed, goes on the first sprint's task list.
| Item | Where to check | Red flag | Fix |
|---|---|---|---|
| Contributors | git log and git shortlog on every repository | Commits from people with no contract or assignment on file | Confirmatory assignment from each contributor |
| Signed assignments | Contract folder, e-signature records | Work-for-hire wording only, unsigned, or no duration and territory where defaults apply | New signed assignment under the governing law |
| Code repository | GitHub or GitLab organization settings | Repository owned by a personal account or the agency's organization | Transfer into the client's organization |
| App store accounts | App Store Connect and Google Play Console account holder | Apps published under the agency's or a freelancer's developer account | App transfer to the client's own developer account |
| Domain and DNS | Registrar account and WHOIS registrant | Domain registered to the developer | Registrant change to the client |
| Cloud and billing | AWS, Google Cloud, Azure, Vercel or Firebase owner and billing account | Production running on the developer's account or card | Move projects to a client-owned account |
| Dependencies | Package manifest and lockfile licence scan | Copyleft licences in distributed code, or unknown licences | Replace, comply or document |
| Paid assets | Font, image, UI kit and SDK licence records | Licences in the agency's name and not transferable | Buy or transfer licences in the client's name |
| Secrets and admins | Password manager, CI variables, admin user lists | Former contributors still hold admin access or keys | Rotate secrets, remove access |
How do you secure ownership in practice at handover?
Our view: Legal ownership and practical control are separate problems: a client can own the code on paper while the repository, cloud account and app store listing sit in a former developer's personal account. Our software project handover checklist lists every asset and account to collect before the final invoice.
If you already have a product built under a weak contract, fix it before fundraising or a sale, when buyers' lawyers will ask for proof of title. Ask each developer to sign a confirmatory assignment covering past work, move repositories and accounts into your organisation, and record open-source licences. Diffwise.app quotes each project after a scoping conversation, and software rescue work starts with the ownership audit described above.
Frequently asked questions
Who owns the code when you hire a developer or an agency?
The developer or agency owns it by default, because copyright belongs to the author until a signed written transfer. An agency's staff are its employees, so the agency holds what they build for you. The US (17 U.S.C. 204(a)), UK (CDPA s.90(3)) and India (s.19(1)) all require a signed written assignment.
If I paid for the app, do I own the source code?
Not automatically. Copyright stays with the developer until a written transfer. The UK Intellectual Property Office says a freelancer usually retains copyright, and the client may get only an implied, limited licence for the intended purpose. Get a signed assignment and keep the repository in your own account.
Is software written by a contractor a work made for hire in the US?
Usually not. A commissioned work is a work made for hire only if it falls within nine categories in 17 U.S.C. 101, such as a translation or an atlas, under a signed written agreement. Software is not listed, so US contracts need a present assignment of copyright as well.
Who owns AI-generated code from tools like ChatGPT or Claude?
OpenAI and Anthropic assign their rights, if any, in outputs to the user. The US Copyright Office said in January 2025 that AI output is protected only where a human determined sufficient expressive elements, and prompts alone do not qualify, so purely generated code may have little copyright.
Can an agency reuse code it wrote for my project?
Under a full assignment of the deliverables, the agency cannot reuse that specific code without your licence. Agencies normally keep pre-existing libraries and know-how. Ask for a clause separating project code from reusable tools, with a permanent licence to those tools.
Who owns the code under German law when a freelancer builds software?
The freelancer stays the author, because German copyright cannot be transferred (UrhG section 29). The client receives rights of use, limited to the contract's purpose if uses are not listed (section 31(5)). Contracts should grant exclusive rights of use in writing, including adaptation and sublicensing.
Does the code ownership clause cover open-source libraries?
No. Open-source libraries stay with their authors and are used under licences such as MIT, Apache 2.0 or GPL. An assignment covers only code written for you, so ask for a dependency and licence list with each release.
What should I do if my developer will not hand over the source code?
Check whether the contract assigns or licenses the source code. Then ask in writing for the repository and a confirmatory assignment, offering to settle genuinely unpaid invoices. If that fails, take advice from a lawyer in the governing-law country.
Sources and further reading
- Copyright Law of the United States, Chapter 2: Copyright Ownership and TransferUS Copyright Office · Checked 23 November 2026
- Circular 30: Works Made for HireUS Copyright Office · Checked 23 November 2026
- Copyright Office Releases Part 2 of Artificial Intelligence Report (NewsNet Issue 1060)US Copyright Office · Published 29 January 2025 · Checked 23 November 2026
- Ownership of copyright worksUK Intellectual Property Office, GOV.UK · Checked 23 November 2026
- Copyright, Designs and Patents Act 1988, section 11legislation.gov.uk, The National Archives · Checked 23 November 2026
- Copyright, Designs and Patents Act 1988, section 90legislation.gov.uk, The National Archives · Checked 23 November 2026
- Directive 2009/24/EC on the legal protection of computer programsEUR-Lex, Publications Office of the European Union · Checked 23 November 2026
- Urheberrechtsgesetz § 69b Urheber in Arbeits- und DienstverhältnissenBundesministerium der Justiz, Gesetze im Internet · Checked 23 November 2026
- Urheberrechtsgesetz § 31 Einräumung von NutzungsrechtenBundesministerium der Justiz, Gesetze im Internet · Checked 23 November 2026
- Urheberrechtsgesetz § 29 Rechtsgeschäfte über das UrheberrechtBundesministerium der Justiz, Gesetze im Internet · Checked 23 November 2026
- Intellectual Property Code (France), consolidated version of 13 March 2025WIPO Lex, World Intellectual Property Organization · Checked 23 November 2026
- Real Decreto Legislativo 1/1996, Texto Refundido de la Ley de Propiedad IntelectualBoletín Oficial del Estado · Checked 23 November 2026
- Legge 22 aprile 1941, n. 633, art. 12-bisNormattiva, Istituto Poligrafico e Zecca dello Stato · Checked 23 November 2026
- Legge 22 aprile 1941, n. 633, art. 110Normattiva, Istituto Poligrafico e Zecca dello Stato · Checked 23 November 2026
- The Copyright Act, 1957, Chapter IV: Ownership of copyright and the rights of the ownerCopyright Office, Government of India · Checked 23 November 2026
- OpenAI Terms of UseOpenAI · Checked 23 November 2026
- Commercial Terms of ServiceAnthropic · Checked 23 November 2026
