I've been asked to develop some apps for people and I was wondering what the common procedure is in relation to ownership of source.

Ideally, I'd like to retain ownership of the source so I can reuse bits and bobs, but give them the app. I thought that maybe I could package the parts I want to retain as libraries and licence them.

What's the best way to handle this?


This depends on the contract you're working under (you're using a contract, right?), but generally with a work-for-hire gig, the source code you produce is also part of what you're selling.

That said, you can't sell 'experience', so in six months when you come across a similar problem, you can say "Oh, I solved this this way a while ago," and write a new piece of code that looks awfully similar --but isn't copy-and-paste identical to the code you sold.

Edited to add a presentation that I find universally topical for freelance work.

  • 1
    An independent programmer NEVER sells the exclusive rights to his source code... those snippets are developed and aggregated over time! It is the PRODUCT that the customer is buying (and potentially, on-going support)
    – Andrew
    Aug 7 '15 at 6:27
  • That's not always (or even often) accurate. A programmer doesn't sell all related source code to what he produces for a client, but usually a contract will involve that specific source code coming under the ownership of your client. Aug 7 '15 at 12:11
  • Where does one draw the line - obviously there's going to be some project specific code that you don't mind handing over. When does it stop being specific to their app and start being specific to an app? I supposed this is the same as asking, what's reasonable to retain...
    – Rich
    Aug 10 '15 at 15:34
  • Well, that's the rub, right? Where does that line exist? You can't exclusively sell a way of solving a problem, just like you can't exclusively sell (say) the plan for building a fence. The way I define it is in relation to its environment --I'm probably not going to solve this problem in this environment again, so that mostly-unique configuration is what I'm selling. Aug 11 '15 at 13:40

The application and source code is yours (assuming you wrote it) unless your contract specifically states this is "a work for hire". If you have no contract, the application and source code is yours. The U.S. copyright law has been this way since 1978, further clarified in early 1980s. Prior to 1978, the US copyright law was as described in answers posted before mine. See IRS link provided in @Tom Griffin's answer. Licensing the app and limited licensing of the source, retaining source to your "background technology" and only releasing object or dll with the limited license for this app's source, is the way I do it. Depending on several factors (did I give them a good deal on price because I knew I could do it quickly/easily since I had already done similar, is this a long-time client I've been supporting for years, is this a small one-off or charity project) is whether and how much I charge for the app source code.

Yes, I know this question already has an accepted answer, but there seems to be a lot of confusion about source code and corp-to-corp or independent contractor (not employee, then it's usually owned by the employer). I've been writing custom software solutions for a long time; I speak from experience (including lots of periodic research).


Echoing previous responses, unless otherwise specified, work like this (where a client pays a contractor for work) is considered work made for hire under the US Copyright Act. In accordance with this, all intellectual property (such as source code) would transfer to the client.

A solid FAQ on copyright and works made for hire is at: http://copyright.gov/circs/circ09.pdf.

That said, you could craft the agreement where the client licenses code from you for either a one-time flat fee or ongoing subscription-based payments (which you would position as support and access to upgrades). If the client is deploying the application within their own infrastructure, include language in the agreement to protect against unauthorized dissemination of the code to unauthorized third-parties.

The client will also (likely) request a clause that states they assume ownership of the code in the event you go out of business or communicate that you are no longer committed to product upkeep. Do a few searches for "source-code escrow" for some ideas.


I am always using a clause saying that I keep the right to reuse the source code in other contexts (excluding unfair competition). If the customer refuses that clause, then the fee is higher as it becomes a case of exclusiveness. Exclusiveness can be partial, i.e. relate to the direct competitors of the customer.

This said you keep other options:

  • deliver binaries only,
  • deliver the sources of the application and binary libraires,
  • deliver the source code but for the sole purpose of compiling the application (no reuse elsewhere, no modification allowed),
  • ...

It is a matter of mutual agreement.

In any case, being the author, you keep the copyright.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.