I have made a couple iPhone applications for a customer and was asked today to hand over the source code so that they could do the maintenance if this should be required. Until now, no code issues were ever discussed.

  • Is there any "common" practice regarding this?

  • Also, in which way should this affect the price?

11 Answers 11


What does your contract with the customer say?

If it doesn't, and this is a work for hire, then they own the source code unless your contract says otherwise.

In the future, you may want your contracts looked over by a lawyer.

I am not a lawyer, this is not legal advice, and you should probably consult a lawyer.

It appears that the answer lies in whether or not this falls under what is considered a work for hire. There's a great article on this at bitlaw, and as I said before, only a lawyer will be able to answer your question.

  • 31
    @Bold: Generally, the person paying for bespoke software development owns the source code. No need for the hyperbole about owning his life. Commented Jan 13, 2011 at 14:40
  • 3
    @Cameron Skinner, are you a lawyer? is the legal advice that correlates with the law in Egil's country? ARE YOU SURE? adding to that, i would say that if you develop a web site you would give the code since hiding the code has no sense in it, this case is different , the code is rendered by compiler and is hidden to the user. in order to run the iPhone app you don't need the original code, as a full contradiction to web server program, as the code is transparent anyways. he can claim that he gave the code the the client payed for which is rendered code by a compiler that turned into iPhone app Commented Jan 13, 2011 at 14:51
  • 10
    +1 for covering the possibilities, recommending being more careful with future contracts, recommending a lawyer, and not going beyond that. Commented Jan 13, 2011 at 14:57
  • 10
    @Bold: No, I am not a lawyer. This is not legal advice. However, in many jurisdictions the general case is that the purchaser of bespoke software owns the entire output (source, compiled code, graphics/art etc) unless there is something specifically in the contract that says otherwise. The OP has not specified which country he/she is in so it is impossible to give specific advice. The OP asked for "common practice": I have stated what I have experienced in my time working for a company that does bespoke development. Commented Jan 13, 2011 at 15:14
  • 2
    @Kate Gregory: No, "work-for-hire" is a specific legal concept in the US, and so the answer is not a tautology. The Wikipedia article (not to be confused with legal advice) may be worth reading. It says that a US employer-employee relationship is work-for-hire, but otherwise there are strict requirements and it needs to be explicit. Do not rely on this without consulting a lawyer. Commented Jan 13, 2011 at 17:01

This is an issue that should be discussed before the project and explicitely written into the contract; it's not only a legal or financial issue, but it also affects in some ways how the project is made. For example, when you know you have to hand-over the source, you will, as a good supplier, make good comments and documentation that matches best-practice expectations. You might also avoid re-using some of your own code, because that code could be so clever that you just don't want to give it away.

Now it is too late. Either concede or contact a lawyer.


It's fairly typical that custom code for a specific customer is expected to be freely available to them upon request. They're buying your time to generate something for them, and they probably at some point will want everything from the work that they paid for. There are of course exceptions.

Normally, software written and "generally" sold will not have the source code freely available, but may have it available for a price.

This is one part of the reason that custom software costs so much more than "general sale" software (even when the "general sale" software may have tiny numbers in circulation).


The general rule is the author of the work owns the copyright: what you create, you own.

There are exceptions to this. The most obvious is work created by an employee. The other exception (Copyright Act of 1976, 17 USC 201) is in the "work for hire"-doctrine which says that the work is owned by the person who paid for it. But for WFH to happen, all of the following must be true:

  1. Work was ordered or commissioned. True.
  2. There was an agreement that the work would be considered a WFH. False.
  3. Work is part of a set of nine specific categories of work: a translation, a contribution to audiovisual work, a contribution to a collective work (such as a magazine), as an atlas, as a compilation, as an instructional text, as a test, as answer material for a test, or a supplementary work. False.

So in this case you are not required to hand over anything.

(Some texts supporting this are here, here, here, here and here)


In my day job it's not uncommon for enterprises to require that our source code be given to an escrow service. The idea is that the enterprise doesn't want to commit to relying on our software without a way for bugs to be fixed - either our company survives so we can fix them, or the escrow service releases the code to them.

However this is presumably a very clear point in a contract, I believe they do not get the source code unless our company fails, and I would expect this is figured into the large price tag related to the contract. I'm not sure how it applies to an individual contractor, small application scenario.

  • I think this is the most common and secure practice used to handle these kind of requests.
    – awe
    Commented Jan 14, 2011 at 5:20

Well for me the source code would be worth actual price * 5

  • 1
    Why * 5? Why not * 4, or * 6.. Or even * 10? That seems pretty convoluted and illogical to me.
    – J.T.S.
    Commented Jan 13, 2011 at 19:38
  • Well offcourse it could be * 4 or 6 or any number , you should only see that as my policy. We don't try to sell source code but sometimes when it become inevitable that's the price
    – maz3tt
    Commented Jan 14, 2011 at 4:21
  • 1
    Explain. What you do is not a good answer alone. Why do you do it?
    – Dynamic
    Commented May 20, 2012 at 11:32

I had a similar situation. When the app was completed the company decided the wanted to buy the source code and have someone else take over (I was only working on it part-time.). They made what I thought was an adequate offer. I thought it was assumed I would alway work on it and neither of us knew they were entitled to the code.

It so happens they were being bought out (didn't mention that to me) and the buyer didn't want any loose ends on software licensing. Not sure if I knew that would I have asked for more. Probably not since the person who put me in touch with this company found me a few other projects as well. I guess good karma can come from ignorance.

In your case should give them the code and ask to be used as a reference for your work.


First as just about everyone has pointed out this should have been part of the original contract. Make sure this point is address in the future.

Second, what is this customer's good will worth? Can you expect to get more business from them in the future? Can you use them as a reference for future work?

Last, how much harm can they do to you? In many if not most industries word get around quick. Will bad feelings from this customer have a negative effect on other customers?

I would probably go ahead and give it to them, possible asking for a small amount of money. Make sure they know you are doing this for their benefit and that you will want this point addressed in an future work you do.


If it was not part of the contract, then no side has hold over the truth.

We need here more of what you said what they said at the agreement point. if you don't agree take a lawyer , and don't let people push you around.

push back and say, i dont work for you, im selling a software customized for your needs, you only asked for the software, the code was not discussed as it will take extra fee from me to modify the code to be presented to outside views.

good luck

I'm not a lawyer, this is no substitution for lawyer discussion, in your local state

  • 2
    If you plan to make the software public, I would certainly contact the lawyer first. If you publish the code and later find out that the company is entitled to the rights of that code, you could be in a world of (unnecessary) hurt. Commented Jan 13, 2011 at 16:12
  • @Wonko thanks i change, as it requires in depth lawyer advice. Commented Jan 13, 2011 at 16:46

If your contract says nothing about code, you don't have any obligation to hand it over to them. Considering that if your client is harmless, you've given up your ability to correct the program on their behalf and consequently any chance you might have to correct it for them as a service. On the other hand, if your client uses that code to make their own application and sell it, there'd be nothing you can do about it. Even if you made them sign a contract stating they can't reuse the code, you'd be hard-pressed in court to prove they did.

If anything, you ask why they want the source. Nothing they could say to that question could justify why they'd need your code when you could simply do it yourself.

  • 4
    Maintaining their application is a perfectly good reason to want source code. Commented Jan 13, 2011 at 13:46
  • 1
    He's selling the software, not the code. Normally programmers maintain the application, not the client. If the client wants the code, he should be talking about selling the rights to his software, not simply handing over the code.
    – Neil
    Commented Jan 13, 2011 at 14:00
  • 7
    I'm not sure that's clear. If they paid him to develop the software (i.e., write the code) and not just purchase the result from him as a product, they may have a valid claim to the source.
    – Ben L
    Commented Jan 13, 2011 at 14:10
  • @Ben, if he is paid to write the code, why would there even be a dispute? What kind of question is he making if he's asking how to give code to the customer at that point? Is this a technical question? Should be in stackexchange.com at that point.
    – Neil
    Commented Jan 13, 2011 at 14:22
  • 3
    @ben not true , if you pay a worker , then all his creation is yours, however he is not a worker, he is a contractor. THAT MAKES IT HIS CODE, and the deal is developing a product. At the same time the quiestion could be "can i release the code under GNU?" what if he did? what would the other side could say then? they NEVER TALKED ABOUT IT , and when you ask new things in Software, you have to PAY MORE FOR IT. Commented Jan 13, 2011 at 14:26

This is an old post , but still in discussion in today's world.

In my opinion, if you are paid by the hour and guided by the client to build a software program, you should hand over the source code.

If you have commercial software and you sell it to them to use.. then no you should NOT hand over the source code.

Regardless of what is legal or not ....as I am not a lawyer either. The right thing to do is hand over the source code. What if somethings happens to you? Your client is left out the cold. In addition, what if your software causes the company harm? YOU ARE RESPONSIBLE! Let go of holding code in hopes to be paid for future work. Just do a good job at a reasonable price in the first place and the work will continue.

And to the person who charges 5X for source code. As a programmer I'd assume you're very good with math. Why would anyone pay 5X for something .. when they can pay another person 1x to just replicate what you built? This is a fast way to get fired. You can't eat your source code... so with thinking like this.. you and your source code will be sitting on the sidelines.

  • 1
    this doesn't seem to offer anything substantial over points made and explained in prior 10 answers. Besides, the last paragraph seems to be merely a comment to another answer here, confusing for readers who can't see why it's there
    – gnat
    Commented Aug 11, 2016 at 18:48

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