In short
In the US, copyright requires human authorship, so purely AI-generated code may not be protected, according to the Copyright Office and the Thaler v. Perlmutter ruling. Human selection, arrangement and modification can support protection, but the exact line isn't settled. Other countries differ. For businesses, the main steps are to keep humans directing and editing, keep records, check tool terms and scan for licensed code. This isn't legal advice.
A note first
This is general information, not legal advice. The law here is new, unsettled and different between countries. If code is core to the value of your company, speak to an intellectual property lawyer.
What the US says
The Copyright Office. Its January 2025 report on copyrightability reaffirmed that works created solely by AI, without human involvement, aren't eligible for copyright. It treats three things differently:
- Prompts. Instructions alone were found to provide insufficient human control over the output.
- Human-created inputs that are perceptible in the output.
- Human modifications or arrangements of AI output, which can support a claim to that human contribution.
The courts. In Thaler v. Perlmutter, the D.C. Circuit confirmed in March 2025 that human authorship is required for registration. That case involved a work claimed to be made entirely by a machine, so it didn't resolve how much human involvement is enough in the mixed cases that matter most to software teams.
These cases and reports mostly weren't about code, so applying them to a software project involves some interpretation. And code that's dictated by function can have limited copyright protection in any case.
| Human contribution | Copyright Office view |
|---|---|
| Prompts alone | Not enough |
| Human-created inputs visible in the output | Can be protected |
| Human modifications or arrangement of output | Can be protected |
Other countries
Don't assume that US rules apply everywhere. Some jurisdictions have different tests for human creativity, and a few have specific provisions for computer-generated works. The UK, for instance, has had a provision on computer-generated works in its copyright law, and it has been under review. If you operate internationally, ask a lawyer about the main markets that matter to you.
What this means in practice
Copyright is only one way of protecting software. Even where parts of your code can't be copyrighted:
- Trade secrets can still protect unpublished code, as long as you keep it confidential.
- Contracts and licences can control how your customers use your software.
- Your brand, data and customer relationships often matter more than the code itself.
- Your compiled service can stay under your control.
What you may lose is the ability to stop someone from copying that part of your code, if they get hold of it. So it's mostly a question of how much of your competitive advantage depends on the code being protected. In other words, for most SaaS businesses, the realistic risk is smaller than headlines suggest, but it isn't zero.
The other copyright question: whose code is it?
There's a separate risk. A model may reproduce code similar to existing open-source projects. If copied material comes with licence obligations, particularly strong copyleft licences such as the GPL, it could create problems for you.
Steps to reduce that risk:
- Use a licence scanner in your pipeline, to flag known code and dependencies.
- Turn on your tool's duplicate-detection filters, where available.
- Check suggested dependencies, including their licences, by hand.
- Check your AI tool's terms. Some commercial plans have offered intellectual property protections or indemnities, under specific conditions. Lovable's pricing page says “You own your code”, subject to third-party rights in the underlying models, which is a good example of why you should read the wording. Your rights against the tool's vendor are not the same as copyright against the rest of the world.
See how to choose a third-party dependency.
What investors and buyers ask
If you're raising money or selling a company, then due diligence may now include questions on AI use:
- What proportion of the code was AI-generated?
- What tools were used, and under what terms?
- Was confidential code sent to third parties?
- Are there licence scans?
- Who designed and reviewed the system?
Having clear answers is better than scrambling. A company with documented human review and clean scans is in a much stronger position than one that can't explain where its code came from.
Sensible steps to take
- Keep humans in charge. Have people design the architecture, make creative decisions, select between options and edit results. It's good engineering, and it also strengthens your position on authorship.
- Keep records. Commit history, design documents and reviews can show human contribution. Keeping track of where AI was used in significant work is helpful, too.
- Review and modify. Don't merge large generated blocks unchanged, without someone understanding them. See how to do a code review.
- Read your tool's terms, particularly on ownership, training on your code, and indemnities. Prefer business plans for work code.
- Scan for licences and known code.
- Fix your contracts. If you're delivering software for clients, then be careful about warranting that all code is original or wholly copyrightable. Update your agreements to reflect how you work. See what should be in a web contract and who owns your website code, domain and design.
- Have a policy. Tell your team and your contractors what's allowed, including what they can paste into AI tools. See is it safe to send customer data to an LLM?
If you're hiring someone
Ask how they use AI tools, whose accounts are used, and what they'd promise about the code's origins. Make sure your contract assigns whatever rights exist to you, and that it says what they've checked.
If your app was fully vibe-coded
Don't panic, but be realistic. If an app was entirely generated from prompts, with no meaningful human changes, your copyright claim over that code could be thin. Your data, brand, customers and ongoing development may be where the value lies. Adding human design and substantial changes over time would improve your position. See how to refactor AI-generated code.
If your company's value depends on proprietary code, get proper legal advice. If you'd like help with the technical side, such as audits and documenting how your code was made, book a call.
Common questions
Can AI-generated code be copyrighted?
In the US, works created solely by AI aren't eligible, according to the Copyright Office. Human modification, selection or arrangement may be protected, but the exact line isn't settled. Rules differ by country, so get legal advice if it matters to your business.
Do I own the code that an AI tool writes for me?
Tool terms often assign you whatever rights exist, but that doesn't guarantee copyright protection against others. Check your tool's terms, as they may be subject to third-party rights. Your position improves when people have meaningfully contributed to the code.
Can AI tools generate code that infringes someone's licence?
It's possible for output to resemble existing code. Reduce the risk using licence scanners, duplicate-detection filters, human review and careful checking of dependencies. Some commercial plans have offered indemnities, under conditions, so read the terms closely.
Does using AI affect selling my company?
It can come up in due diligence. Buyers may ask how much code was generated, which tools were used and whether confidential code was shared. Clear records, human review and clean licence scans put you in a stronger position.