Does Your Employer Own the Code You Write on Weekends?
Not automatically. Section 17(c) of the Copyright Act, 1957 makes the employer first owner of work made in the course of employment, so everything turns on whether weekend work falls inside that course, and on how widely your IP clause is drafted.
Side projects, open source contributions and weekend startups are normal for Indian engineers, and the intellectual property clause in a standard employment contract is often drafted far more broadly than the statutory default. Knowing where the default sits tells you what the clause is actually adding, what you can reasonably ask to change, and what to do if you are already building something that matters to you.
Key takeaways
- Under Section 17(c) of the Copyright Act, 1957, an employer is first owner only of work made in the course of employment under a contract of service.
- "In the course of employment" is narrower than "at any time while employed". Your role, your employer's resources and overlap with its business all matter.
- Contracts commonly claim more than the statutory default. Ask for a business-relatedness test and an annexure listing your existing projects.
- An assignment should specify rights, duration and territory under Section 19(2); if duration is silent, Section 19(5) deems it to be five years.
- Under Section 57, your moral rights of authorship subsist independently of copyright and even after an assignment.
What does Indian copyright law say by default?
Section 17 of the Copyright Act, 1957 starts from a simple rule: the author of a work is its first owner. It then sets out exceptions. Clause (c) provides that where a work is made in the course of the author's employment under a contract of service, the employer is the first owner of the copyright, in the absence of any agreement to the contrary.
Software is protected as a literary work, because the definition of literary work in Section 2(o) includes computer programmes. So the same rule that applies to a report or a design applies to your code.
The operative words are "in the course of the author's employment". That is a narrower idea than everything you create during the period you happen to be employed. Work done in your role, using your employer's time and resources, sits squarely inside it. A project unrelated to your role, built on your own equipment and your own time, is a different question, and the contract rather than the statute usually decides it.
Is weekend code made "in the course of employment"?
There is no single test, and the answer depends on facts. The questions that usually matter are whether the work is the kind of thing you are employed to do, whether your employer directed or expected it, whether you used company laptops, cloud accounts, code or confidential information, and how closely it overlaps with the employer's business.
Timing alone does not decide it. A feature for your employer's product written at home on a Sunday is still probably your job's work. A budgeting app written during a lunch break on your own phone, with no connection to your employer's business, probably is not. The table below sets out common situations and how the default usually reads.
| Situation | Likely position under Section 17(c) | What to do |
|---|---|---|
| Fixing your employer's product from home on a Sunday | Probably in the course of employment: it is your job, wherever you do it | Assume the employer owns it |
| Personal app on your own laptop, unrelated to your employer's business | Probably outside the course of employment | Check the contract, which may still claim it, and keep records |
| Open source library you maintain that your team also uses at work | Grey area: depends on who directed the contributions and when | Get a written open source policy or carve-out |
| Product in the same domain as your employer, built partly on a company laptop | Weak position for you: resource use and overlap point towards the employer | Stop using company devices and take advice before launch |
| Code you wrote before joining | Not caught by Section 17(c): you remain the owner unless you assign it | List it in an annexure to your appointment letter |
What do employment contracts add on top?
This is why the IP clause matters. Typical Indian employment agreements go well beyond Section 17(c), assigning to the employer all intellectual property "conceived, created or reduced to practice during the term of employment, whether or not during working hours". Some contain no requirement that the work relate to the business, and a few try to reach work created before joining or for a period after leaving.
A clause of that width is not the statutory position; it is a contractual expansion of it. Whether a particular expansion is enforceable depends on its wording and the facts. A clause that tries to capture work created after you leave also raises questions under Section 27 of the Indian Contract Act, 1872, which makes agreements in restraint of a lawful trade or profession void, and courts have generally been reluctant to enforce post-employment restraints.
Confidentiality clauses work alongside the IP clause. Even where you clearly own a side project, using your employer's source code, customer lists, pricing data or unreleased product plans to build it is a separate breach, and it is the easiest way to turn a strong ownership position into a weak one. Keep a clear line between what you know generally as a skilled engineer, which you are free to use, and what you learned from confidential company material, which you are not.
Inventions are a separate track. The Patents Act, 1970 has no equivalent of Section 17(c), so who owns an employee's patentable invention is largely a question of contract and facts. That is one more reason the wording of the clause matters more than people expect.
The formalities most clauses ignore
Section 19 of the Copyright Act sets requirements for assignment. Under Section 19(1) an assignment must be in writing and signed by the assignor or a duly authorised agent. Under Section 19(2) it must identify the work and specify the rights assigned, the duration and the territorial extent. Under Section 19(5), where the period is not stated, the assignment is deemed to be for five years, and under Section 19(6), where the territory is not stated, it is presumed to extend to India.
Section 18(1) adds that an assignment of copyright in a future work takes effect only when the work comes into existence. That is how a clause covering "all future works" operates: it can work, but it is an assignment, and it carries the Section 19 requirements with it.
These defaults cut in interesting directions. A sweeping assignment clause that names no term is not necessarily the permanent transfer the drafting implies. Separately, Section 57 provides that the author's special rights, to claim authorship and to object to distortion or mutilation prejudicial to honour or reputation, subsist independently of copyright and even after it has been assigned.
Wording to propose before you sign
Most employers will not delete the IP clause, and you should not ask them to. What you can reasonably ask for is a clause that ties the assignment to the employer's business and excludes genuinely independent work. A version that many employers accept reads along these lines:
"The Company's rights under this clause extend only to Work Product that (a) results from work performed by the Employee for the Company, (b) relates to the actual or demonstrably anticipated business of the Company, or (c) is developed using the Company's equipment, facilities, confidential information or working time. Works listed in Annexure A, and works created outside working hours without use of Company resources and unrelated to the Company's business, remain the property of the Employee."
Annexure A should list your existing projects by name, with a one-line description and a link to the repository if public. If you contribute to open source, ask for a sentence permitting contributions to named projects under their existing licences, subject to not disclosing confidential information.
Practical questions for your own contract
- Does the IP clause require the work to relate to the employer's business, or does it claim everything created during the term?
- Does it reach work created outside working hours and on your own equipment?
- Does it purport to cover work created before you joined, or for a period after you leave?
- Does it specify rights, duration and territory as Section 19(2) requires, or rely on a one-line statement of ownership?
- Is there a carve-out mechanism, such as disclosing existing projects in an annexure at the point of joining?
- Does it address open source contributions, which are common and often overlooked?
- Is there a separate moonlighting, dual employment or conflict of interest clause that restricts side work even where ownership is clear?
If you already have a side project, what should you do?
The cleanest approach is disclosure at the start. Listing existing projects in an annexure and agreeing they are excluded converts an ambiguity into a written position at the moment when both sides are being reasonable. Employers routinely accept this for genuine pre-existing work.
If you are already employed and building something significant, take these steps in order. Read the IP, confidentiality and moonlighting clauses together. Stop using any company device, account or code for the project. Keep the project in a personal repository so the commit history shows dates and authorship. Do not use anything you learned from confidential company material. Then decide whether to seek a written no-objection or release from your employer.
Consider an example. Priya, a backend engineer at a Bengaluru fintech, builds an expense-splitting app on weekends. An angel offers ₹50 lakh for 10% of her new company. The angel's counsel asks for her employment contract, finds a clause claiming all works created during employment, and makes a written release from her employer a condition of closing. Had she listed the project in an annexure when she joined, or asked for a release before approaching investors, that condition would have been a formality rather than a negotiation.
Where the project might become a company, the position depends on your specific clause, what you built and what resources you used. That is a fact-specific question with real commercial stakes, and it is worth an advocate rather than an internet answer.
Have a contract in front of you?
Upload it and get every clause checked against Indian law, with the provision each finding rests on.
Review your employment contractFree templates for this
Common questions
My contract says the company owns everything I create while employed. Is that valid?
Clauses of that breadth are common and go beyond the Section 17(c) default, which is limited to work made in the course of employment. Whether a particular clause is enforceable as drafted depends on its wording and the facts. It is worth reading closely, asking for a business-relatedness limit before signing and, where a real side project is involved, taking advice.
Does the five-year rule in Section 19(5) mean my employer loses my work after five years?
Not necessarily. Section 19(5) addresses assignments that do not specify a period, deeming them to be for five years. It does not touch work your employer owned from the start as first owner under Section 17(c). How it applies to a specific clause depends on its drafting and the facts, so do not plan around it without advice.
Can I contribute to open source while employed in India?
Usually yes, but check the contract. Many Indian employment agreements are silent on open source, which leaves contributions sitting inside a broad IP clause by default. If contributing matters to you, ask for a written permission covering named projects under their existing licences, with a promise not to disclose confidential information. It is far easier before signing than after.
Does using my company laptop for a side project change who owns it?
It can weaken your position considerably. Use of employer equipment, accounts or code is one of the facts courts and employers look at when deciding whether work was made in the course of employment, and many contracts expressly claim anything developed with company resources. Keep side projects entirely on personal devices and accounts.
Is moonlighting illegal in India?
There is no general criminal prohibition for private-sector office employees, but your contract may restrict outside work through a dual employment, exclusivity or conflict of interest clause, and breach can justify disciplinary action. Ownership of what you build is a separate question from whether you were allowed to build it, so check both clauses.
My employer asks me to sign a fresh IP assignment after joining. Should I?
Read it first. A confirmatory assignment covering work done in your role is normal and often needed for diligence. Check whether it widens the scope beyond your role, reaches projects you listed as excluded, or covers future work after you leave. You can ask for the same carve-outs as in your original appointment letter.
Do I keep any rights in code my employer owns?
Some. Under Section 57 of the Copyright Act, 1957, the author's special rights, to claim authorship and to object to distortion prejudicial to honour or reputation, subsist independently of copyright and even after assignment. In practice these rarely affect commercial use of code, but they explain why authorship and ownership are treated as different things.
Related guides
This article is general information about Indian law as of 2026-10-26, not legal advice, and reading it does not create an advocate–client relationship. Statutes and rules change, particularly under the Labour Codes, where State rules differ from State to State. Consult a qualified advocate about your own situation.