Are you tired from someones for copying text, images or other important information from your website and want to know  how to disable copy text from website. If yes, then listed below solution will surely help you out for the same. This is very easy task to stop copying text from web pages by using a simple CSS as well as Javascript code.
Right Click Disabled

Different Methods to Prevent Copying Text from the Website

A lot of methods are available to solve the query how to disable copy text from the website. So choose a suitable one as per your requirement and apply on your webpage.

1) Add this code to stop copying text within a tag (such as: <p>, <h1>, <div> and  <span>  etc .). You can also use this code with <body> tag to disable copy text from whole page.

<div id="test"onmousedown='returnfalse;'onselectstart='returnfalse;'> 

2) Same as above one more 1 line code is available which can be added in a particular tag to prevent copying text from the page.

<body oncopy="returnfalse"onpaste="returnfalse"oncut="returnfalse"> 

3) How to disable copy text from a website using Java script –  Add  this Javascript code before closing </head>tag to prevent users from copying text or images. This code also disable right click from the page.

var isCtrl = false;
if(e.which == 17)
if(e.which == 123)
if (((e.which == 85) || (e.which == 65) || (e.which == 88) || (e.which == 67) || (e.which == 86) || (e.which == 2) || (e.which == 3) || (e.which == 123) || (e.which == 83)) && isCtrl == true)
alert('This is Function Disabled');
// right click code
var isNS = (navigator.appName == "Netscape") ? 1 : 0;
if(navigator.appName == "Netscape") document.captureEvents(Event.MOUSEDOWN||Event.MOUSEUP);
function mischandler(){
alert('This is Function Disabled');
function mousehandler(e){
var myevent = (isNS) ? e : event;
var eventbutton = (isNS) ? myevent.which : myevent.button;
if((eventbutton==2)||(eventbutton==3)) returnfalse;
document.oncontextmenu = mischandler;
document.onmousedown = mousehandler;
document.onmouseup = mousehandler;
//select content code disable
function killCopy(e){
function reEnable(){
document.onselectstart=newFunction ("return false")
if (window.sidebar){

4) One more single line Javascript code is available which helps to disable copy text or images from the web page. Just put it before closing </head> tag.

<script type="text/javascript">
$('body').bind('copy paste cut drag drop', function (e) {   e.preventDefault();});

5) To disable particular fields from copying just use below code before </head> tag.

<script type="text/javascript">
$('input[type=text],textarea').bind('copy paste cut drag drop', function (e) {   e.preventDefault();});

6) Disable Copy or Paste Text from Website by Using CSS: You just need to create a new class in css you are using for your website like that:

.noselect {
-webkit-user-select: none;
-webkit-touch-callout: none;
-khtml-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;

Now you can call the class on the HTML page in specific tag where you want users to stop copying text. Either you can call this call on <body> tag to disable copying from entire page.

<p class="noselect">  XYZ</p>


<body class="noselect">XYZ</body>


If, for some specific reasons, you would like to disable or  prevent users from copying as well as pasting text from your web pages by using Ctrl-C and Ctrl-V commands then above listed methods will be helpful. Still, you are facing issues in using the above codes, then feel free to put a comment. Your suggestions and feedbacks are also welcome.