Skip to content
Source code

Who owns your company's code before you license it to AI

Code your employees wrote is the company's. A contractor's code stays theirs until they sign it over. US and UK law, and the papers AI companies ask for.

Last checked December 1, 2026

A bunch of old iron keys on a ring, hanging from a pine branch

Your company owns the code its employees wrote for their jobs. Code from a contractor, an agency or a co-founder who wrote it before the company existed is different: in the US and the UK, it stays with the person who wrote it until they sign a written transfer. AI companies that license code ask you to confirm you hold the rights before they look at a sample, so find the papers first.

Code your employees wrote belongs to the company

In the US, code an employee writes “within the scope of his or her employment” is a work made for hire. The employer “is considered the author” and owns the copyright, unless both sides “expressly agreed otherwise in a written instrument signed by them” (17 U.S.C. § 101 and § 201(b)).

UK law says the same. When an employee makes a work “in the course of his employment, his employer is the first owner of any copyright in the work subject to any agreement to the contrary” (Copyright, Designs and Patents Act 1988, section 11).

Neither rule covers code a staff member wrote on their own time, outside their job. Their employment contract decides that.

A contractor isn’t an employee, so the copyright starts with them. Paying the invoice doesn’t change that.

  • US: a transfer of copyright “is not valid unless” it is in writing and signed by the owner (17 U.S.C. § 204(a)).
  • UK: an assignment “is not effective unless it is in writing signed by or on behalf of the assignor” (section 90(3)).

A US contract that calls the code “work made for hire” may not be enough on its own. The law lets commissioned work count as made for hire only in nine categories, such as a compilation or a contribution to a collective work, and software isn’t named among them. That’s why most contractor agreements also have an assignment clause. Look for the word “assign”.

Agencies, offshore teams and freelancers count as contractors

Miro Advisory says “Clear ownership matters, including work produced by contractors or offshore teams.” Patronus AI’s form asks whether contractors or an agency contributed to the code, and the answer it wants is “Yes, and the company has written IP assignments.”

If an assignment is missing, ask a lawyer whether one signed now can cover the past work.

Co-founders’ code from before the company existed is theirs

Code written before the company was formed had no employer, so it belongs to whoever wrote it. Founders usually sign it over to the company at the start. If a co-founder left without doing that, the written-transfer rule above applies to their code too.

Dataconto

See if AI labs would license your code

Answer seven questions and see who would pay for it. It's free, and we never email or call you first.

Matching your answers

A company shows up here once your answers meet everything it asks for.

Your answers stay anonymous unless you ask for an introduction.

Code you built for clients is usually the client’s

Agency and consulting contracts often give ownership to the client. Pangea says not to submit “client-owned” code. Patronus asks whether “A client or another company owns some or all of it.” Miro’s FAQ says any dataset with client information “requires appropriate rights and legal review.”

Read the client contract. Even where your agency kept the copyright, a confidentiality clause can still stop you sharing the code.

Code you bought comes with the paper that bought it

If your company acquired the code, or bought a closed company’s assets, the purchase agreement is your proof. Patronus asks for “an IP assignment, acquisition agreement or written authorization from the rights holder”, and attaches that evidence to the license.

Open-source libraries stay out, and that’s fine

You license your own code, not the libraries it uses. Pangea leaves out “Generated files, vendored code, binaries, data dumps and third-party code” from what it values. Patronus asks for lines of original code and says to “Exclude third-party libraries and generated code.” Pangea also asks you to disclose “any relevant third-party rights or restrictions.”

Keys in the history are a security fix, not an ownership problem

Rotate any key that was ever committed. GitHub says that after a secret is revoked or rotated, “it can no longer be used for access, and that may be sufficient.” Rewriting history to hide it changes the hash of every commit that came after.

Don’t squash or rewrite your history before you license it. Pangea scrubs secrets, credentials and personal data from its own copy, and history is most of what code buyers pay for. How to sell source code explains why.

The papers to have ready

  • Signed IP assignments from every contractor, agency and freelancer who wrote code.
  • The founders’ assignment from when the company was formed.
  • Client contracts for any code built for a client.
  • The purchase agreement for any code you bought.
  • A list of the third-party libraries and their licenses.

Pangea says you are “responsible for ensuring that you own or have the right to license every codebase you submit.” If one paper is missing, settle it with a lawyer before you apply. Then the fit check shows which AI companies would take your code, and the worth calculator counts what it could earn.

Buyers in this guide

Sources

More guides