Guide · Employment and IP

Moonlighting and Side Projects in India: What the Law Says and Who Owns the Code

Moonlighting means taking a second job or paid side work while employed full time. In the Indian technology sector it also covers freelance projects, open-source work, a startup built at night, and advisory roles. Employers ask whether they can prohibit it. Employees ask whether it is illegal, and who owns what they build in their own time.

India has no single moonlighting law. The answer comes from the employment contract, section 27 of the Indian Contract Act, 1872, a few dual employment provisions in labour statutes, and the ownership rules in the Copyright Act, 1957 and the Patents Act, 1970. This guide sets these out for employers and employees. It reflects the law and published sources as read on 25 November 2026.

Is moonlighting illegal in India?

Moonlighting is not a criminal offence, and no central law prohibits a second job for every employee. Whether it is permitted in a particular case depends on three things: what the employment contract and policies say, whether a labour statute applies to the establishment, and whether the side work uses the employer's confidential information, time or equipment.

The Union Government took a similar view when the question was raised in Parliament. In a written reply in the Lok Sabha on 19 December 2022, the Minister of State for Labour and Employment referred to the standing orders framework under the Industrial Employment (Standing Orders) Act, 1946, under which a workman shall not at any time work against the interest of the industrial establishment in which he is employed, and shall not take any employment in addition to his job which may adversely affect the interest of his employer. The reply also said the Government had not conducted any study on moonlighting.

So the legal test is less about the second job itself and more about breach of contract, conflict of interest and harm to the employer.

Which laws apply to dual employment in India?

The statutory provisions on double employment were written for factories and shops, and most of them regulate working hours and worker safety. They do not address a software engineer freelancing at night. The table shows what each one covers.

Indian provisions on dual employment and where they apply
LawWhat it saysDoes it apply to an IT office?
Employment contract and company policyExclusivity, conflict of interest, confidentiality and IP clauses. Terms differ from company to company.Yes. This is the main source of the rule for IT employees.
Indian Contract Act, 1872, section 27Agreements in restraint of trade are void. Courts treat restraints during employment as outside the section and restraints after employment as within it.Yes, to every employment contract.
Factories Act, 1948, section 60No adult worker shall be required or allowed to work in a factory on a day on which he has already been working in another factory, save in prescribed circumstances.No. It applied to factories. The Labour Codes have since replaced the central factory law.
OSH Code, 2020, section 30No worker shall be required or allowed to work in a mine or factory if he has already been working in another such establishment within the preceding twelve hours, save in prescribed circumstances.No. It is limited to factories and mines.
Delhi Shops and Establishments Act, 1954, section 9No person shall work about the business of an establishment, or two or more establishments, or an establishment and a factory, in excess of the period during which he may lawfully be employed under the Act.Yes, for offices in Delhi. It limits total hours across jobs. It is not a ban on a second job as such. Other States have their own Acts.
Standing orders (Industrial Relations Code, 2020)The standing orders chapter applies to industrial establishments with 300 or more workers. The Model Standing Orders, 2026, notified on 8 May 2026, include a schedule for the service sector. Published summaries describe restrictions on taking competing employment or acting against the employer's interest without permission.Only for larger establishments, and only for employees who are 'workers'. Read the notified schedule for the exact wording.

Can an employer prohibit moonlighting in the employment contract?

Yes. A clause that requires an employee to work only for the employer during the employment, or to take approval before accepting outside work, is a restraint that operates during employment. Indian courts have long treated such clauses as valid.

In Niranjan Shankar Golikari v. Century Spinning and Manufacturing Co. Ltd. (1967), the Supreme Court dealt with a negative covenant operating during the period of the employment contract. In Vijaya Bank v. Prashant B. Narnaware (2025 INSC 691, decided on 14 May 2025), the Court relied on Golikari and on Superintendence Company of India v. Krishan Murgai (1980) and said that negative covenants operating during the tenure of employment do not fall foul of section 27. The clause in that case was a minimum service term with liquidated damages, and the Court noted that its object was to further the employment contract and not to restrain future employment.

The position changes when employment ends. A clause that bars a former employee from working for a competitor, or from carrying on a side business they had already started, is generally void under section 27. An employer can still enforce confidentiality and IP terms after exit.

An exclusivity clause should be drafted to fit the business. A complete ban is simple to state but hard to enforce evenly, and it catches harmless activity such as teaching, writing or unpaid open-source work. Many technology employers use a disclosure and approval model in its place: outside work is allowed if it is disclosed, does not compete, does not involve customers or vendors, and does not use company time, equipment or information.

Who owns the code an employee writes as a side project?

Start with section 17 of the Copyright Act, 1957. The author of a work is its first owner. Under proviso (c), where a work is made in the course of the author's employment under a contract of service, the employer is the first owner in the absence of any agreement to the contrary. Everything turns on the phrase 'in the course of employment'.

The phrase is not defined in the Act. In practice the question is whether writing that code was part of the job the employee was hired and paid to do. Work that falls within the employee's duties, is done on the employer's instructions, or grows directly out of an assigned project is made in the course of employment, even if some of it was written at home or after hours. Work that is unrelated to the employee's role and the employer's business, done in the employee's own time with their own equipment and without the employer's information, is generally outside it. The employee is then the first owner.

The contract can move this line in either direction, because proviso (c) applies only in the absence of an agreement to the contrary. Many technology employment contracts include a wide assignment clause that claims everything the employee creates during the employment that relates to the employer's business or uses its resources. An assignment by an employee must meet section 19: it must be in writing, signed, and must identify the work and the rights assigned. A clause that tries to claim all future work of every kind, unconnected to the business, is harder to defend and may be read narrowly.

Patents follow a different rule. Under section 6 of the Patents Act, 1970, a patent application may be made by the true and first inventor or by that person's assignee. The Act does not make the employer the owner of an employee's invention by default. Section 68 requires an assignment of a patent, or of a share or interest in it, to be in writing, in a document that sets out the terms between the parties. Employers therefore need an express invention assignment clause, and employees should read it before starting a project that may be patentable.

Where a side project used the employer's laptop, working hours or information, the position changes. These are the facts that most often decide a dispute.

  • Employer equipment and accounts: writing side-project code on a company laptop, repository or cloud account gives the employer evidence that the work is connected to the employment, and usually breaches the acceptable use policy. Under many contracts, use of company resources brings the work within the assignment clause.
  • Working hours: doing paid outside work during contracted hours is a breach of the duty to work for the employer during that time, whatever the contract says about exclusivity.
  • Confidential information: using the employer's source code, customer data, pricing or roadmap in a side project is a breach of confidence and of the confidentiality clause. This duty continues after the employee leaves, and it is enforceable because it is not a restraint of trade.
  • Competing products and shared customers: building a competing product, or selling services to the employer's customers or vendors, is a conflict of interest and a common ground for disciplinary action.
  • Open-source contributions: contributing to an open-source project can release code under a licence the employer has not approved. If the contribution includes employer code, it may also disclose confidential material. A policy should say when contributions are allowed.

How do companies detect dual employment?

There is no official register of second jobs. Published reports and background verification firms describe two records as the usual sources. The first is the provident fund record. Each member has a Universal Account Number (UAN), and contributions from two employers for the same months show an overlap. The second is the tax record: tax deducted by more than one payer appears in the employee's annual tax statement, which a candidate may be asked to share during background checks.

These records have limits. They do not show freelance work paid without provident fund contributions, work for foreign clients or unpaid projects. An overlap may also have an innocent explanation, such as a delayed exit date at a previous employer. An employer should ask for an explanation before drawing conclusions. Checks that use an employee's personal data should be covered by the employment contract and privacy notice, with the Digital Personal Data Protection Act, 2023 in mind.

What can an employer lawfully do about moonlighting, and what can it not do?

An employer has wide room to regulate outside work during employment, provided the rule is written down and applied fairly.

  • It can prohibit or restrict outside work in the employment contract, or require disclosure and prior written approval.
  • It can require employees to declare outside interests at joining and each year.
  • It can take disciplinary action, up to termination, for breach of the policy. The process should be fair: a written allegation, a chance to explain, and a reasoned decision. For employees who are 'workers', and under State Shops and Establishments Acts, notice and procedure rules apply. In Delhi, notice is not required for dismissal for misconduct only where the employee has been given an opportunity to explain the charge in writing.
  • It can claim ownership of side-project code that was made in the course of employment or falls within a valid assignment clause, and can seek an injunction against use of its confidential information.
  • It cannot stop a former employee from taking up other work after exit by relying on a non-compete. That restraint is void under section 27.
  • It cannot withhold earned wages as a penalty. Section 17(2) of the Code on Wages, 2019 requires wages to be paid within two working days of removal, dismissal, retrenchment or resignation, and deductions are limited to those the Code allows.
  • It should not claim ownership of work that is unrelated to the business and was created without company time, equipment or information, unless a clear written assignment covers it.

What should an employee check before starting a side project?

  • Read the employment contract and handbook for clauses on exclusivity, outside employment, conflict of interest, IP assignment and confidentiality.
  • If approval is required, ask for it in writing and keep the reply. Describe the project accurately.
  • Keep the project separate: personal laptop, personal accounts and repositories, and no work during office hours.
  • Do not use the employer's code, data, designs, customer lists or know-how, even from memory of specific confidential details.
  • Avoid projects that compete with the employer or involve its customers, vendors or investors.
  • If the project may become a company or a product, ask the employer for a written carve-out that confirms it does not claim the IP. Investors will ask for this later.
  • Check any open-source licence and the employer's contribution policy before publishing code.
  • Remember that tax and provident fund records may show a second paid role. Declare all income correctly and take tax advice if unsure.
Moonlighting policy checklist for employers
Policy itemWhat to decide and record
ScopeWhich activities are covered: second employment, freelance work, directorships, advisory roles, own startup, open-source, teaching and writing.
RuleBan, or disclosure with approval. State what is always refused, such as work for competitors, customers or vendors.
Approval processWho approves, the form to use, the time for a decision and how often approval is renewed.
Company resourcesNo use of company time, devices, accounts, code or data for outside work.
IP ownershipAn assignment clause tied to the employee's duties, the employer's business and company resources, and a process to record carve-outs for approved personal projects.
ConfidentialityA reminder that confidentiality duties apply to outside work and continue after exit.
DeclarationsA declaration of outside interests at joining and annually.
VerificationWhat checks the company may run, on what records, and a privacy notice that covers them.
ConsequencesDisciplinary steps, the hearing process and who decides.
Local lawA check against the Shops and Establishments Act of each State where the company has offices, and standing orders if they apply.

How we help

Prodigy Legal drafts and reviews employment contracts, moonlighting and conflict of interest policies, IP assignment and invention clauses, and carve-out letters for approved side projects. The firm advises employers on disciplinary process in dual employment cases and advises founders and employees on ownership of side-project code before a company is formed or funded.

Frequently asked questions

Is moonlighting illegal in India?

No central law makes moonlighting illegal for all employees. It is mainly a matter of contract. If the employment contract or policy prohibits outside work or requires approval, taking a second job without approval is a breach that can lead to disciplinary action. Statutory dual employment provisions exist, but they are narrow: section 60 of the Factories Act, 1948 and section 30 of the OSH Code, 2020 concern factories and mines, and State Shops and Establishments Acts differ.

Can a company fire an employee for moonlighting in India?

Yes, if the contract or policy prohibits it and the employer follows a fair process. The employee should be told the allegation in writing and given a chance to explain. Notice and termination rules under the State Shops and Establishments Act, and the Industrial Relations Code for employees who are 'workers', still apply. Dismissal is easier to defend where the side work competed with the employer, used its time or equipment, or involved its confidential information.

Does my employer own the app I built in my free time?

Not automatically. Under section 17, proviso (c) of the Copyright Act, 1957 the employer owns work made in the course of employment. An app unrelated to your job, built in your own time with your own equipment and without the employer's information, is generally outside that. Check your contract, because a written assignment clause can widen what the employer owns, particularly for work that relates to its business or uses its resources.

Is a clause banning a second job enforceable in India?

During employment, generally yes. The Supreme Court has held that negative covenants operating during the term of employment do not fall foul of section 27 of the Indian Contract Act, 1872, most recently in Vijaya Bank v. Prashant B. Narnaware (2025). After employment ends, a clause that stops a person from working elsewhere is generally void under section 27.

Can an employer find out about a second job through PF or UAN?

Often, yes. Published reports and background verification firms say that overlapping provident fund contributions under the same Universal Account Number are the usual sign of dual employment, and that tax deducted by more than one payer appears in tax records. These records do not capture freelance work paid without provident fund, so they are not complete, and an overlap can have an innocent explanation.

Who owns an invention made by an employee in India?

The Patents Act, 1970 has no rule that gives an employee's invention to the employer by default. Under section 6, a patent application may be made by the true and first inventor or by that person's assignee. An employer therefore needs a written assignment, usually through an invention assignment clause in the employment contract followed by a specific assignment for each application. Section 68 requires assignments of patents to be in writing.

Last reviewed: 2026-11-25. This guide gives general information about Indian law for technology companies. It is not legal advice, and every matter turns on its own facts. It is not tax advice. Several of the rules described here are new or differ from State to State, and the current notified text governs.

Contact

Tell Us What You Need

Describe your matter in a few lines. A lawyer will reply by email, usually within one working day.

CallWhatsApp