- Intellectual property
- Commercial contracts
- Technology and AI
Can I copyright code I wrote with AI in Malaysia?
Can I copyright code I wrote with AI? The short answer
In Malaysia, code is protected only if enough effort made it original (Copyright Act 1987, section 7(3)(a)), and whether code an AI tool wrote meets that test is not settled. Code you wrote yourself is protected if enough effort went into it, so keep dated records that show which parts are yours.
Copyright (hak cipta in Malay, 版权 in Chinese) is the right to control who copies, changes or sells a work, such as code. It needs no filing: if the code qualifies, the right exists as soon as the code is written and saved. Original does not mean new. It means enough of the author's own time, labour and skill went into the work.
So is the code yours? It depends on how much of it came from you. Your own code, with an AI tool suggesting a few lines, is the strongest AI-assisted case. AI code you directed and changed comes next: a better claim than a few short prompts, but it is not settled. A vibe-coded app is one built by describing it to an AI tool, without writing code. One made from a few short prompts is the weakest case, and it may have no copyright. Even in the weakest case, you can still license or sell the app in writing, on honest terms. Before you sell it, see the other legal steps for an app built with AI.
Key facts (Malaysia, as at 28 November 2026):
- Malaysia's copyright law has no rule on AI; it was last amended in 2022.
- We found no Malaysian court decision on copyright in code an AI tool wrote.
- Code is protected as a literary work, the class that covers written text.
- Copyright protects how the code is written, not what the app does.
- Copyright needs no registration; notifying MyIPO is optional and costs RM200 for each work notified, online.
- Since December 2025, MyIPO's form asks you to declare that the work was made without AI help.
- MyIPO's consultation on changing the law closed on 14 August 2026, with no bill yet.
What does Malaysian copyright law need before code is protected?
Malaysian law protects code as a computer program, a kind of literary work, if enough effort made it original and it has been written down or saved.
In 2022, in a case about engineering drawings, the Federal Court read the test as sufficient effort in time, labour and skill. That case decided nothing about code or AI, but it is the highest court's reading of the test.
The first owner of copyright is the author, which for code means its writer or maker. Copyright in code then lasts for the author's life plus 50 years. A tool has no life to measure, which suggests the law expects a human author.
Copyright law has no rule for work a computer makes with no human author. Malaysian law has such a rule for industrial designs (how a product looks), but it does not cover code. No court has decided what that gap means for code an AI tool wrote.
How much of the code must come from me, not the AI tool?
No law sets a percentage or a number of lines. The more of the written code that shows your own effort and choices, the stronger your claim.
From the strongest claim to the weakest:
- Code you wrote by hand: protected if enough effort went into it.
- Your own code, with autocomplete: you write, and the tool suggests the next few lines, which you accept, change or reject. The code is most likely your own work, though no court has drawn the line.
- AI code you directed, reviewed and changed: a better claim, but not settled. The lines you rewrote, restructured or added are the strongest part.
- AI output you chose and arranged: arguable, and not settled. Many rounds of prompting, choosing and arranging may help, but they would not protect each line the AI wrote.
- A few short prompts: the weakest case, which may have no copyright. This includes whole files you accepted unchanged from an agent, an AI tool such as Claude Code or Cursor that writes files from a task description.

Suppose a tool such as Lovable built your whole app, and you never edited the code. Many rounds of prompting and choosing put your case between the last two cases in the list. Your prompting and choosing may help, but not for each line the AI wrote. An app from a few short prompts is the weakest case. Your written specification and notes are your own writing, though probably a separate work from the code. So keep a record of your choices as you make them.
Short prompts sit at the bottom because a prompt that says what the code should do is close to an idea, and copyright does not protect ideas. In 2018 a High Court held that a person who said they gave the programmer ideas and advice had not proved they were the program's author. That case involved two people, not an AI tool, so it is only a guide.
Your changes help. In a 1997 case, the other side argued that the program's conversion into another language could be done "rather mechanically" by a software tool, so it involved no creativity. The High Court still found the new version original, because a programmer had to insert, add or modify nearly 4,000 lines. That was not an AI case either, but it shows that proof of human work counts.
If the AI-written parts have no copyright, what can a copier take?
Someone who copies code you wrote or shaped can be liable for infringing (breaking) your copyright. Copying only the parts an AI tool wrote, with little input from you, is untested in Malaysia.
Copyright protects how code is written, not what the app does, its features or the idea behind it. So anyone may build an app that does the same thing in their own code.
Some say AI-written code is not copyrightable, or is in the public domain, free for anyone to copy. In Malaysia that is not settled, and it does not apply to code you wrote yourself.
To infringe, a copier must take the whole work or a substantial part of it. The Federal Court has said three things must be shown. The copy is objectively similar (closely alike), it was actually copied from your work, and what was taken is a substantial part. Substantial means important, not only large, so a small but central module can count.
In a codebase that mixes your code with AI-written code, the parts you wrote or shaped carry your claim. A court might treat the whole program as one work, as the 1997 case did for a software package. But no court has tested that with AI-written parts. So do not assume the whole codebase is protected, or that only the lines you typed are.
Other law still protects the product. Code you keep secret can be protected as confidential information, whoever wrote it. A licence (permission to use the code) or terms of use bind the people who accept them, and a registered trade mark protects the app's name.
How do I prove which parts of the code I wrote?
Keep records made at the time that show your own work, because in a dispute the person claiming copyright must prove the effort that made the code original.
In the 2018 case, the claim failed partly because no evidence of that effort was given. A formal statement of ownership (an affidavit or statutory declaration) can also help. But it must follow the Copyright Act strictly, with a true copy of the work attached; in that case the programs were not attached.
Your commit history, prompts and chat logs are documents a computer produced. A court can accept them as evidence if the computer produced them in its ordinary use, even with human input along the way (Evidence Act 1950, section 90A). The court then decides how much weight each one carries, meaning how far it relies on it (section 90B). It looks at how soon after the work the record was made. It also asks whether whoever kept it had any reason to hide or twist the facts.
So records made at the time, and held by someone else, may carry more weight. Examples are emails, invoices and a hosted repository's push and pull-request records (its dated log of each upload and proposed change), such as GitHub's. Another is AI chat history kept in your online account, such as ChatGPT's. Records made long after the work may count for less. So may dates you can change yourself, such as those in your local git history. So may AI logs saved on your own computer, which you could edit, such as Claude Code's or Cursor's.

Keep the records that show the AI's share too. A copier could use them to argue that those parts have no copyright. But the same records point to your own choices, and anything you sign, such as MyIPO's form or a promise to a buyer, must be true anyway.
If the code already exists, start now: export or download your AI chat history, as some tools delete it after a set time. Push your code to a private hosted repository, so someone else holds a dated copy from today. If you built the app by prompting a tool such as Lovable, connect it to a private GitHub repository or download the code, and keep the project's version history. Some tools add a line to each commit naming the AI as a co-author; leave it in, as a true record that an AI tool helped make that commit.
Can I notify MyIPO of code an AI tool helped write?
MyIPO's form asks you to declare that the work was made without AI help, so it does not fit code written with AI tools. Never sign that declaration if it is not true.
The owner may notify MyIPO (the Intellectual Property Corporation of Malaysia), which many people call registering; the legal term is voluntary notification (pemberitahuan sukarela hak cipta in Malay). On 28 November 2026, MyIPO's fee page showed RM200 a work, filed online on form CR-1.
Since December 2025, the form's declaration has read: "This work was created without the assistance of Artificial Intelligence (AI) and solely represents the author's own creativity and personal effort." That line is in MyIPO's form, not in the copyright law or its regulations. No rule says code made with AI help can never be notified, but you cannot sign that line truthfully for it.
MyIPO then issues a certificate for the notified work, and may cancel it if the form was false or misleading. A knowingly false statement to MyIPO can also be an offence under the Copyright Act. If it is, the penalty is a fine of RM10,000 to RM50,000, prison of up to five years, or both. MyIPO has not said whether a module written with no AI help at all, not even autocomplete, could be notified on its own. So ask MyIPO or a lawyer before you try.
Notifying does not create copyright. MyIPO's record is only evidence of what it says, which the other side can dispute. So if you cannot sign the form, you lose no copyright by not notifying; you rely on your own records instead. Notifying also means sending MyIPO an electronic copy of the work.
If your company plans to claim MDEC's Malaysia Digital tax incentive, notification matters. MDEC's guidelines give the New Investment Incentive's 0% rate on software royalties (payments for the right to use it) and licence fees. The rate applies only where the company owns the software and has notified it at MyIPO, or at a similar office abroad. If AI tools wrote much of your company's code, check this before you plan on the incentive.
Ask a lawyer before you sign form CR-1 for code an AI tool helped write. Ask one too before you give a buyer, a licensee (someone you let use the code) or an investor any promise about the code.
This article is general information about Malaysian law as at 28 November 2026. Its copyright rules apply in all of Malaysia, including Sabah and Sarawak. It is not legal advice on your situation, and reading it does not make you or your company a client of the firm. The law, MyIPO's forms and AI tools' terms change, so check the current position before you rely on it.
Frequently asked questions
Can I license or sell my app if its copyright is not settled?
Yes, in writing: in Malaysia, a copyright licence or assignment has no effect otherwise. A licence lets others use whatever rights you have; you keep them. A sale should transfer (assign) "all copyright and other rights, if any". A licence is also a contract. Tell the licensee which parts AI tools wrote. They are then bound by what they signed, such as paying the fee, even if some code has no copyright. No Malaysian court has ruled on this, so set out what the fee buys and for how long. See what a software development agreement should say about IP.
AI tools wrote all of my app's code. What do I tell a buyer or licensee?
Say so plainly: an AI tool wrote all of the code from your instructions. Then say what you bring: your idea and written specification, your design choices, the text and pictures you made, and the running app with its users and name. Not all of these have copyright (an idea has none), but they are what the other side pays for. Do not call the code original or all yours. In Malaysia, a promise that proves untrue can cost you compensation, and an untrue statement can let the other side undo the deal.
My AI tool's terms say I own the output. Does that give me copyright?
No. An AI tool's terms settle rights only between you and the tool company. They cannot create copyright the law does not give, and they do not bind a copier who never agreed to them. On 28 November 2026, no tool we checked promised that its output has copyright. Anthropic (Claude), OpenAI (ChatGPT) and Cursor pass you their rights "if any". Lovable says you own your apps and their AI output "as between us", subject to any third-party rights. GitHub (Copilot) says only that it does not claim ownership. Bolt's terms say AI output "may not be protectable by copyright".
Someone got the same code from the same AI tool. Did they copy mine?
Not unless they copied it from you. In Malaysia, infringing copyright needs actual copying: the Federal Court has said the copy must come from your work, directly or indirectly. Two people who ask a tool for the same thing can get similar code. On 28 November 2026, the terms of OpenAI, Cursor, Lovable and Bolt warned that other users may get the same or similar output. So similar AI-written code, by itself, does not show that anyone copied.
Do my prompts have copyright?
A long prompt, specification or design note you wrote yourself is your own writing. In Malaysia it can be protected as a literary work if enough effort went into it. But it is probably a separate work: it does not make you the author of the code an AI tool wrote from it. A short instruction, such as "build me a booking app", states what the code should do, which is closer to an idea. Copyright does not protect ideas, and we found no Malaysian court ruling on prompts.
Can I move code written with AI tools into my Sdn Bhd?
Yes, by a written assignment (a transfer of the copyright), as for any code. In Malaysia, an assignment of copyright has no effect unless it is in writing (Copyright Act 1987, section 27(3)), and forming a company moves nothing. Assign whatever rights exist, with the files and know-how behind the app. That works even if the AI-written parts have no copyright. The company then owns what you owned, and no more. For the steps, approvals and stamp duty, see how to transfer an app to your Sdn Bhd.
Can I put an MIT or GPL licence on code an AI tool helped write?
Yes, for the parts that have copyright, such as code you wrote: MIT lets others "deal in the Software", and the GPL covers "any copyrightable work". For parts with no copyright, a licence may add little, and whether its conditions bind as a contract is untested. MIT itself lets anyone use, copy, change and sell the code if they keep your copyright and licence notice. So keep any paid version you want to hold back from competitors private, as confidential information. Also check that an AI tool has not copied someone else's open-source code, whose licence would still apply.
If parts of my code have no copyright, can I still keep the code secret?
Yes. In Malaysia, confidential information can be protected whoever wrote it. The Federal Court has said the information must be confidential, shared under a duty to keep it secret, and used without permission, to the owner's harm. Code kept on your own server is easier to keep secret. An app that opens in a web browser sends at least its screen code to each user's browser. A mobile app carries its code on the phone. So ask whoever set it up which parts stay on the server. Before showing the code to anyone, ask them to sign a non-disclosure agreement.
Is my code protected outside Malaysia too?
Usually, but on each country's own terms. Malaysia is a member of the Berne Convention (a copyright treaty), so other members protect Malaysian code without any filing, under their own law. Those laws differ on AI. In the United States, the Copyright Office said in January 2025 that copyright protects only what a person authored, including their creative choices and changes. It added that prompts alone are not enough. The United Kingdom still protects computer-generated works, though its government proposed in March 2026 to remove that rule. So code with large AI-written parts may fare differently in each country.
Is Malaysia changing the law on AI-written code?
Not yet. MyIPO's public consultation on changing the Copyright Act closed on 14 August 2026. The Dewan Rakyat's list of 2026 bills, read on 28 November 2026, had no such bill. On 4 August 2026, a deputy minister gave the Dewan Negara the government's reading of the current Act. In that reading, work generated entirely by AI, without significant human creative input, does not qualify for copyright. The ministry is also reviewing who should own AI-generated work. A deputy minister's answer is not law, and it said nothing about code a person wrote or shaped with AI help.
Sources
- Copyright Act 1987 (Act 332), sections 1, 3, 7, 13, 17, 26, 26A, 26B, 27, 36, 42, 43 and 48 (as at 30 June 2022)
- Laws of Malaysia Online: list of amendment Acts, no Copyright Act amendment after Act A1645 of 2022 (read 28 November 2026)
- Copyright (Voluntary Notification) (Amendment) Regulations 2022, P.U.(A) 62/2022, regulations 5 and 8
- MyIPO Form CR-1, notification of copyright in a work, Section G, declaration items 3 and 4 (read 28 November 2026)
- MyIPO: notifying copyright, forms and fees, item 1 (read 28 November 2026)
- Industrial Designs Act 1996 (Act 552), sections 2 and 10(6): a design generated by computer with no human author
- Evidence Act 1950 (Act 56), sections 90A to 90C (as at 1 May 2017)
- Contracts Act 1950 (Act 136), sections 2, 10, 17, 18, 19, 26 and 74
- YKL Engineering Sdn Bhd v Sungei Kahang Palm Oil Sdn Bhd & Anor [2022] 6 MLJ 1 (Federal Court, 8 July 2022): originality is sufficient effort in time, labour and skill, not novelty; the three elements of infringement
- Chuah Aik King v Keydonesoft Sdn Bhd [2019] 8 MLJ 515 (High Court, 30 April 2018): the author of a program is its writer or maker; ideas are not protected; the claimant must prove the effort; a statutory declaration without a copy of the programs failed
- Creative Purpose Sdn Bhd & Anor v Integrated Trans Corp Sdn Bhd & Ors [1997] 2 MLJ 429 (High Court, 24 January 1997): a revised program original on proof of human work; each program and the whole package can have copyright
- Dynacast (Melaka) Sdn Bhd & Ors v Vision Cast Sdn Bhd & Anor [2016] 3 MLJ 417 (Federal Court, 16 May 2016): the elements of a claim for breach of confidence
- Unified Public Consultation: proposed amendments to the Copyright Act 1987, MyIPO, 3 July to 14 August 2026 (closed): a proposal, not law
- Parliament of Malaysia: Dewan Rakyat bills of 2026 (read 28 November 2026)
- Hansard, Dewan Negara, 4 August 2026, oral question 4, pages 15 to 17 (uncorrected text)
- MDEC: Malaysia Digital Tax Incentive, with its FAQ and New Investment Guidelines of 9 July 2025, Appendix 2 (read 28 November 2026)
- Anthropic Consumer Terms of Service, Outputs (read 28 November 2026)
- OpenAI Terms of Use, rest of world (effective 1 January 2026)
- Cursor (Anysphere) Terms of Service, sections 1.4 and 5.3 (read 28 November 2026)
- GitHub Terms of Service, section J, GitHub Copilot (effective 27 April 2026)
- Lovable Terms of Service (last updated 28 August 2026)
- StackBlitz (Bolt) Terms of Service, section 3.3 (last updated 22 September 2026)
- Open Source Initiative: the MIT License
- Free Software Foundation: GNU General Public License, version 3
- WIPO: Berne Convention for the Protection of Literary and Artistic Works, Article 5
- US Copyright Office: Copyright and Artificial Intelligence, Part 2, Copyrightability (29 January 2025)
- US Copyright Office: registration guidance for works containing material generated by AI, 88 FR 16190 (16 March 2023)
- United Kingdom: Copyright, Designs and Patents Act 1988, section 9(3)
- United Kingdom: Report on Copyright and Artificial Intelligence (18 March 2026)
- Claude Code documentation: data usage, local session transcripts kept 30 days by default (read 28 November 2026)
- GitHub Docs: chatting with Copilot on GitHub.com, messages kept 28 days (read 28 November 2026)
- OpenAI Help Center: exporting your ChatGPT history and data (read 28 November 2026)
- Lovable documentation: GitHub sync and code download (read 28 November 2026)
- MDN Web Docs: client-side code is downloaded and run by the browser (read 28 November 2026)
