Who owns the code when AI builds your app?

Short answer
- 7 of the 8 AI tools I checked on 4 December 2026 say the output is yours, or hand you whatever rights they hold in it. Replit’s terms say you keep the rights to your content and have no clause on AI output. None of them claims to own your app.
- Copyright law is less generous. The US Copyright Office says AI output is protected only where a human “has determined sufficient expressive elements”, and prompts alone don’t count.
- UK law still protects computer-generated works for 50 years under section 9(3) of the 1988 Act, but in March 2026 the government proposed removing that protection.
- If a freelancer or agency builds your app in the UK, they own the copyright by default unless you agree otherwise in writing.
- Control beats paperwork: your own GitHub repository, your name on the Apple ($99 a year) and Google Play ($25 once) accounts, and an export taken before you cancel any plan.
You described an app to an AI tool and it wrote thousands of lines of code. So who owns them: you, the tool, or no one at all?
I get asked this a lot, usually by a business owner who’s just realised their whole product lives inside someone else’s platform. The short version: the tools all say it’s yours. The law is fuzzier about whether there’s any copyright in machine-written code to own. And the thing that bites people in practice is whose name is on the accounts.
I read every set of terms below on the company’s own site on 4 December 2026, from the UK, and checked the law on legislation.gov.uk, gov.uk and copyright.gov. This is general information from someone who’s run an app platform since 2011. It isn’t legal advice, and if real money hangs on the answer, pay a solicitor for an hour.
Who owns the code generated by AI?
You do, as far as the AI tool is concerned. Every tool I checked says you own the output, assigns you any rights it has in it, or (Replit) says you keep the rights to your content.
That’s only the first of 3 layers, though.
- The tool’s terms. A contract between you and the AI company. It settles what the company can claim (nothing) and what it can do with your project (often quite a lot).
- Copyright law. Decides whether code written by a machine has any copyright in it at all. The UK and US answer differently.
- Everyone else involved. A freelancer, an agency, a no-code platform, the open-source libraries inside the code. Each one has its own claim or licence.
Take them in that order. Most of the confusion comes from mixing them up.
What do the AI tools’ terms say about who owns the code?
None of them claims your app, and nearly all say outright that the output belongs to you, with small print about how they can use your project and how easily you can leave. Tick what matters to you below and see who’s left.
Code ownership finder
Who owns the code? AI tool terms compared
Tick what you need and see which tools qualify, with the wording from each tool's terms.
| Tool (terms read 4 Dec 2026) | Who owns the output | Getting the code out | Your own repository | Conditions worth knowing |
|---|---|---|---|---|
| Claude Free, Pro and Max (consumer terms, effective 8 Oct 2025) | Anthropic assigns you its rights “(if any)” in Outputs, if you comply with the terms | Yes. Claude Code writes files on your own machine | Yes, any repository you like | The UK consumer terms say “Non-commercial use only”. Trains on your chats unless you opt out |
| Claude API and business offerings (commercial terms, effective 17 Jun 2025) | Customer “owns its Outputs” | Yes | Yes | No training on your content. Anthropic defends IP claims over paid use, with exclusions. No free plan |
| ChatGPT and Codex (Europe terms, updated 16 Jan 2026) | You “own the Output” | Yes. Copy it out, or Codex writes to your files | Yes | Output “may not be unique”. Trains on your content unless you opt out. Business use is covered by an addendum |
| Lovable (updated 28 Aug 2026) | You own your projects and “any AI Output generated for you” | ZIP download on paid plans only | Git sync on any plan, into a new repository | You grant Lovable a “worldwide, perpetual, royalty-free” licence, including model training, with an opt-out on every plan |
| Base44 (updated 22 Jun 2026) | You own the code and apps “to the extent such rights exist under applicable law” | ZIP on the Builder plan or higher, and the code “still relies on Base44 to run” | GitHub sync on the Builder plan or higher | You grant an “irrevocable” and “perpetual” licence over your data and output. Free accounts may be used for business |
| Bolt (StackBlitz) (updated 2 Dec 2026) | You keep your content. StackBlitz assigns its rights, “if any”, in AI Output | ZIP download on desktop | GitHub sync | Terms warn output “may not be protectable by copyright”. Model-training licence unless you opt out |
| Replit (updated 3 Aug 2026) | You “retain any and all of your rights” to your content. No clause on AI output | Through a connected GitHub or GitLab repository | GitHub or GitLab | Pro and Enterprise run on separate agreements. Replit can open private apps for troubleshooting |
| Cursor (Anysphere, updated 3 Sep 2026) | Anysphere assigns you its rights “if any” in Suggestions | Nothing to export. The code is on your machine | Yes, any repository | No training on your content unless you’ve explicitly agreed |
| v0 (Vercel) (AI Product Terms, effective 31 Mar 2026) | You own your content. Vercel assigns its rights, “if any”, in the Output | Through GitHub sync | GitHub sync | Vercel’s Hobby plan is for “personal or non-commercial use” and trains on your content by default |
Who owns the code that Claude writes?
You do. If you build an app with Claude, Anthropic’s consumer terms (Free, Pro and Max) say: “we assign to you all our right, title, and interest (if any) in Outputs”, subject to you sticking to the terms.
There’s a catch for businesses. The version of those terms served to me in the UK applies to “a consumer who is resident in the United Kingdom” and includes a clause headed “Non-commercial use only”. If the app is for your business, the cleaner footing is the commercial terms, which cover API keys and Anthropic’s business offerings.
Those are stronger. The customer “owns its Outputs”, Anthropic “may not train models on Customer Content”, and Anthropic promises to defend you against a claim that your paid use of the service infringes someone’s intellectual property. That defence has exclusions, including changes you make to the output and anything you combine it with.
Who owns the code ChatGPT or Codex writes?
You do. OpenAI’s terms for the UK and Europe say you “own the Output” and that OpenAI assigns you “all our right, title, and interest, if any” in it.
The same terms add that output “may not be unique and other users may receive similar output”. So you own your copy, and somebody else may own a near-identical one.
Lovable, Base44, Bolt, Replit and v0: yours, with strings
The app builders all confirm ownership too. Lovable’s FAQ is the plainest: your apps and code “are yours”, and you can “use them commercially, and host them wherever you choose”.
The strings are in 2 places. First, the licence you hand back. Lovable’s is “worldwide, perpetual, royalty-free” and covers training its models, though you can opt out on any plan. Base44’s is “irrevocable”. Bolt’s terms include a model-training licence unless you opt out.
Second, the exit. Lovable only lets you download a ZIP on paid plans (Git sync works on every plan). Base44 needs the Builder plan for a ZIP or GitHub sync, and its own docs say the export is “a copy of your code, not a way to move your app off Base44”. On v0, Vercel’s terms of service keep the free Hobby plan for “personal or non-commercial use”.
Owning code you can’t run anywhere else is a thin sort of ownership. I compared the 2 biggest builders on this in Lovable vs Base44.
Can AI-generated code be copyrighted?
Partly. The parts a human shaped can be protected in both the UK and the US. Code a machine wrote from a prompt, with no human creative input, has no copyright in the US and an uncertain future in the UK.
The UK position
The UK is unusual: it has had a rule for this since 1988. Section 9(3) of the Copyright, Designs and Patents Act says that for a computer-generated work, the author is “the person by whom the arrangements necessary for the creation of the work are undertaken”.
The Act defines computer-generated as made “in circumstances such that there is no human author”, and section 12 gives those works 50 years of protection. On paper, that could be you, the person who wrote the prompts.
I wouldn’t build a business on it. The government’s report on copyright and AI, published on 18 March 2026, says section 9(3) contains “a legal contradiction” (a work needs a human author’s creative choices to be original, and these works have no human author). It also found minimal evidence that anyone relies on the protection.
Its conclusion: keep monitoring, but “in the absence of evidence of its ongoing value, we propose that this specific type of protection should be removed, while copyright should continue to protect works created with AI assistance”. The consultation behind it closed on 25 February 2025.
That’s a proposal. Section 9(3) was still on the statute book when I checked on 4 December 2026.
The US position
The US requires a human author. The Copyright Office’s report on copyrightability (Part 2, 29 January 2025) concluded that AI output “can be protected by copyright only where a human author has determined sufficient expressive elements”.
It says protection can cover a human who “makes creative arrangements or modifications of the output, but not the mere provision of prompts”. It also confirms that using AI to help “does not bar copyrightability”. The Office’s AI page lists its March 2023 registration guidance too, for works containing AI-generated material.
The courts agree so far. In Thaler v. Perlmutter, the D.C. Circuit ruled on 18 March 2025 against registering a work with an AI as its only author, and the Supreme Court’s docket shows the petition to review it was denied on 2 March 2026.
So is it true that AI-generated code cannot be copyrighted?
Only for code no human touched. An app is a lot more than its raw generated lines, and most of the rest is plainly yours:
- Your edits and structure. Code you rewrote, rearranged or chose between is human work.
- Your designs and content. Screens you drew, copy you wrote, photos you took.
- Your data. Customer records, product lists and orders. Often the most important asset in the whole thing.
- Your brand. The name and logo, which a registered trade mark protects far better than copyright ever would.
The purely machine-written remainder may have thin protection or none. In theory, someone could copy those parts.
In practice it rarely matters. A competitor can’t see your server code, and they can prompt their own version in an evening anyway. What makes your app yours commercially is the customers, the data, the store listing, the domain and the brand. All of those are held by contracts and accounts, which is why the checklist further down is about accounts.
Who owns the code when a freelancer or agency builds your app?
They do, unless your contract says otherwise. For most UK businesses this matters more than anything in the AI terms.
The Intellectual Property Office’s guidance is blunt: when you commission a work, “the first legal owner of copyright is the person or organisation that created the work and not you the commissioner, unless you otherwise agree it in writing”. Paying the invoice doesn’t transfer it.
Without a clause, a court may find you have an implied licence to use the app, which the same guidance warns can be “a limited non-exclusive licence”. That’s a long way from owning it.
Employees are the exception. Under section 11, work made “in the course of his employment” belongs to the employer. And an assignment only counts if it’s “in writing signed by or on behalf of the assignor” (section 90).
The US works much the same way for contractors. The Copyright Office’s Circular 30 lists 9 categories of commissioned work that can be “made for hire”, and each needs a signed written agreement. Custom software isn’t named in the list, so US contracts normally include an assignment as well.
So ask for 4 things in writing before work starts:
- An assignment of all intellectual property in the work to you, on payment.
- The code delivered into a repository you own, from day 1.
- A list of any third-party or open-source code used, with its licences.
- A statement of which AI tools were used and on which plan, since the tool’s terms flow through to you.
When we quote for custom app development, the client owns the code. If a developer won’t agree to that, treat it as your answer and keep looking. There’s more on choosing help in when to hire a developer for your AI-built app.
Who owns an app built on a no-code builder?
You own your content, your data and your brand. The platform owns the software that runs them, and you rent it.
That includes ours: an app made on our builder runs on our platform. Base44’s terms draw the same line: you get a limited licence to use the platform, and the company keeps everything it built.
It’s a fair trade for most small businesses. You pay a monthly fee and skip a custom build that starts around £10,000. But go in knowing that leaving means rebuilding, so keep copies of your content and customer data somewhere you control. I weigh up that trade in no-code vs AI vs custom development.
How do you check AI-generated code for copyright and open-source licences?
Ask the AI to list every package the project depends on and its licence, then have a developer confirm it. It takes minutes and it’s easy to skip.
AI tools build apps out of open-source libraries. Lovable’s FAQ says your code is yours “subject to third-party rights such as open-source licenses”. Base44’s terms go further and warn that generated output “may also violate third party rights”.
Most libraries in a typical web app use permissive licences (MIT, Apache 2.0) that allow commercial use if you keep the licence notice. The ones to look for are copyleft licences such as GPL and AGPL, which can oblige you to publish your own source code in some situations. One of those in the wrong place is worth a conversation with a developer.
The other risk is the AI reproducing a recognisable chunk of someone else’s code. I can’t give you a reliable number for how often that happens, so I won’t. If your app handles money or sensitive data, a human review covers this along with the security problems that are far more likely to hurt you. I’ve written about those in is vibe coding safe?
How do you make sure you own your app?
Put your own name on everything, and get the code somewhere you control. Work through these 7 checks.
- Code in your own GitHub. Create the GitHub account yourself, with a company email, and connect the tool to it. If a developer set up the repository under their account, have it transferred to yours.
- Store accounts in the business’s name. The Apple Developer Program ($99 a year) and Google Play ($25 once) accounts should belong to your company. An app published under an agency’s account is controlled by the agency.
- Domain. Registered to you, renewing on your card.
- Hosting and database. You’re the account owner, with the developer added as a team member. Your customer data lives here.
- Payments and email. Stripe, the email sender and any other service the app calls: your accounts, your logins.
- An assignment clause. In writing, signed, with anyone who writes code or designs for you.
- Export before you cancel. On Lovable the ZIP download is a paid-plan feature, and on Base44 both export routes need the Builder plan. Take a full copy of the code and the data before you downgrade.
If you’re 5 for 7 or worse, fix that before you spend another pound on features. Most of it is free and takes an afternoon.
And if you can’t get the code out, or it won’t run once it’s out, that’s a job for vibe code rescue. If you’re starting fresh and want it set up properly from the first day, code ownership is part of our AI-assisted builds too. Still choosing a route? Start with how to get an app made.
FAQ
Who owns the code generated by Claude?
You do. Anthropic’s consumer terms assign you its rights “(if any)” in Outputs, and its commercial terms say the customer “owns its Outputs”. The UK consumer terms are for non-commercial use, so a business should build on the commercial terms.
If I build an app with Claude, do I own it?
Yes, as far as Anthropic is concerned. Whether every line has copyright protection depends on how much of it you shaped yourself, but your designs, content, data and brand are yours either way.
Who owns the code Codex writes?
You do. OpenAI’s terms say you own the Output and that OpenAI assigns you any rights it has in it. The terms also say other users may receive similar output.
Can AI-generated code be copyrighted in the UK?
Possibly. Section 9(3) of the Copyright, Designs and Patents Act 1988 protects computer-generated works for 50 years, but in March 2026 the government proposed removing that protection. Code with real human creative input is protected like any other work.
Is AI-generated code copyrighted in the US?
Only the human-authored parts. The US Copyright Office concluded in January 2025 that prompts alone don’t make you the author, though your creative modifications and arrangement of AI output can be protected.
Does a freelancer own the app they built for me?
In the UK, yes by default. The person who creates a commissioned work is the first owner of the copyright unless you agree otherwise in writing, so get a signed assignment clause.
Can I move my app out of Lovable or Base44?
From Lovable, yes: Git sync works on any plan and ZIP download on paid plans. From Base44 you can export code on the Builder plan, but Base44’s docs say the exported code still relies on Base44 to run.
Can I use AI-generated code commercially?
Usually, but check the plan you’re on. Anthropic’s UK consumer terms and Vercel’s Hobby plan are limited to non-commercial use, while Lovable and Base44 allow business use on their free plans.
Last Updated on December 4, 2026 by Ian Naylor