# Software copyright ownership: who owns the code?

Source: https://techduediligence.co/insights/software-copyright-ownership/

Copyright in software belongs first to the person who wrote it, unless a rule of law or a contract says otherwise. A company owns its product only to the extent that each author's rights have reached it. For founders, that means getting a few documents right early, and for buyers, checking that the documents match the people who did the writing.

## Key points

- Copyright arises automatically when code is written and starts with its author, so the company's ownership always rests on a rule or a document.
- Employees are usually covered by law or by contract. Founders before incorporation and contractors usually are not, unless they signed an assignment.
- Open-source components are licensed to the company, not owned by it, and outside contributions to the company's own projects stay with their authors unless agreed otherwise.
- Code generated by AI tools may have limited copyright protection in some jurisdictions, so know how much of the product it represents.

## How copyright in code works

Copyright protects the code as it is written. It does not protect the idea behind the software or what the software does. A competitor who independently writes different code that performs the same function does not infringe. That limit is why confidentiality, and in some cases patents, matter alongside copyright.

The right arises automatically when the code is written. In most countries nothing has to be registered for it to exist. Registration is available in some, including the United States, where it matters for enforcement, but it is not what creates the right.

The consequence for a transaction is that there is no register to search. Ownership is shown by establishing who wrote the code and how each author's rights passed to the company.

## Employees

In many countries the law gives the employer the rights, or at least the economic rights, in software an employee writes in the course of the job. A well-drafted employment contract confirms the same thing. This is the strongest link in most companies' ownership.

It still has limits worth checking.

- **Scope of the job.** The rule covers work done as part of the employment. A side project, or work by someone hired for a different role, can fall outside it.
- **The employing entity.** In a group, the developers may be employed by one company while another claims to own the product. The rights sit with the employer until they are moved.
- **The contract and the country.** A template written for one jurisdiction may not have the intended effect in another, and some countries give authors rights that cannot be signed away.

The evidence is a signed contract with an intellectual property clause for every employee who wrote code, from the right entity.

## Founders before incorporation, and contractors

Two groups are generally not covered by the employee rule.

**Founders before incorporation.** Code written before the company existed cannot have been written as its employee. It belongs to the founder personally, or, in the worse case, to the founder's employer or university at the time. It becomes the company's when the founder assigns it, which is normally done at incorporation or at the first financing. The cases that cause trouble are the prototype written during a previous job, the co-founder who left early without signing anything, and the founder who keeps the software in a personal company and licenses it to the business.

**Contractors.** A freelancer or agency generally owns what it writes unless a written assignment transfers it, and paying the invoice does not usually change that. The details, and the cure, are in [contractor IP assignment](/insights/contractor-ip-assignment/).

## Open-source contributors

Open source raises the ownership question in two directions.

The first is the open-source code inside the product. The company does not own it and never will. Each component belongs to its authors and is licensed to everyone on stated terms. "We own all our code" is therefore never literally true of a modern product. The accurate statement is that the company owns what its people wrote and holds licenses to the rest.

The second is the company's own open-source project, if it runs one. People outside the company who contribute to it keep the copyright in their contributions, unless a contributor agreement provides otherwise. They license their work under the project's license. That matters when the company wants to change the license, or sells the same software under commercial terms, because it can only grant rights it holds. A buyer valuing a business built on selling commercial licenses to an open-source project should ask to see the contributor agreements.

## AI-generated code

Many legal systems tie copyright to human authorship. In the United States, the Copyright Office has taken the position that material generated by an AI system without sufficient human creative contribution is not protected. Elsewhere the position varies or is unsettled, and the law is developing.

Two consequences follow for a company whose engineers use AI coding tools. First, code that no one authored cannot be owned or assigned in the usual way, so a competitor who obtained it might be free to copy it, although confidentiality may still protect it. Second, generated code can resemble existing code that is under someone else's license. Both are discussed in [AI-generated code: the IP and license questions buyers now ask](/insights/ai-generated-code-ip-risk/).

None of this makes a product built with AI assistance unownable. Engineers who direct, select and rework the output contribute authorship of their own. It does mean that a buyer will ask how much of the codebase was generated, and whether it is concentrated in the modules that carry the value.

## Why paper and history must agree

A company's ownership is recorded in two places. The contracts show who was supposed to write the code and on what terms. The version control history shows who did.

When the two agree, the seller's statement of ownership is supported. When they differ, someone wrote code without a document that covers it, and that person may hold rights in part of the product. The comparison, the typical gaps and the ways to close them are set out in [IP chain of title](/insights/ip-chain-of-title-software/).

This article is general information, not legal advice. The rules on first ownership, assignment and AI-generated material differ by jurisdiction and turn on the facts, and counsel should be consulted.

## How we approach it

Our [technical due diligence](/tech-due-diligence/) tests ownership against the code. We map each clause that assigns intellectual property in the agreements and compare it with the contributors in the code history. The result is a chain-of-title score and a list of gaps, each linked to its source clause.

Every report also includes GenAI code provenance: an estimate of the share of the codebase generated by AI, its concentration by module, and the implications for IP and security. From the same history we report the share of external contributors.

All of this runs in Codekeeper's private environment, in the region chosen for the transaction. Nothing is sent to AI vendors and nothing is used for training. How the analysis works is described on our [technology page](/technology/). Both sides read one report, and the seller responds beside each finding, on the record. This is analysis, not legal advice.

## Questions we are asked

### Does the company own code an employee wrote at home?

It depends on whether the work was done in the course of the employment, on the contract and on the country. Code written for the product as part of the job is usually the employer's wherever it was typed. A personal project unrelated to the role may not be. Counsel should look at any case where the answer matters.

### Do we need to register the copyright in our software?

In most countries the right exists without registration. Some countries offer registration with procedural advantages, particularly for enforcement. Whether it is worthwhile is a question for counsel in the markets that matter to you.

### How do you establish who wrote the code?

From the version control history, which records an author and a date for every change. We compare those contributors with the assigning clauses in the agreements in the data room and report the gaps. The history is strong evidence, and the seller can respond on the record where it needs explaining.
