How to highlight and copy text on sites that block it

Martin Brinkmann
Dec 24, 2014
Updated • Jun 10, 2020
Internet
|
86

Every now and then I come across sites on the Internet that prevent you from copying some or all of the text displayed to the clipboard, or even selecting it in first place using the mouse or keyboard.

I noticed this on a bank's site recently for example where I was not allowed to copy the bank account number to the clipboard.

This guide looks at methods to overcome the limitation put in place by websites on the Internet. But first, why do sites implement these restrictions in first place?

While reasons are provided by companies and individuals who implement the functionality on their web properties, the most likely reason is some form of copy protection.

ADVERTISEMENT

Method 1: Turn off JavaScript

javascript

Most websites use JavaScript to block mouse functionality. If you turn off JavaScript on the site temporarily or even permanently, you will be able to copy text displayed on it using the mouse.

Some websites rely on JavaScript on the other hand which means that you may run into issues doing so. Some may even refuse to display at all when JavaScript is turned off.

  • Firefox users can press F12, then F1 to open the preferences and check the disable JavaScript on the page that opens..
  • Chrome users can disable JavaScript in the Content settings: chrome://settings/content
  • Internet Explorer users can turn off JavaScript in Internet Option > Security > Zone > Custom Level > Active Scripting
  • Opera users can disable JavaScript under Websites in the Opera settings: opera://settings/

Extensions like NoScript can be useful in this regard as they block the execution of scripts as well.

NoScript

Version Firefox add-on 2.1.2.3

Method 2: The source

Another option that you have is to display the source code of the website you are on. Since it is displayed in a plain text editor it is possible to copy anything from it without restriction.

Simply press Ctrl-u while you are on the site to display its source code. This works in most browsers including Firefox, Chrome and Internet Explorer.

It is still necessary to find the text or content that you are looking for in the source. Use Ctrl-f to jump directly to it.

There you may also find links to images and other contents that you could not save or copy.

Method 3: Extensions and scripts

The third and final option is most suitable if you encounter sites regularly that prohibit right-click use or text copying when you are on them, and if the methods outlined above don't work or are not really suitable.

You find numerous extensions for these two browsers that remove annoyances on websites.

Summary
How to highlight and copy text on sites that block it
Article Name
How to highlight and copy text on sites that block it
Description
Some sites block text selection and copying using JavaScript. This guide looks at three methods that allow you to copy text on these sites anyway.
Author
Publisher
Ghacks Technology News
Logo
Advertisement

Previous Post: «
Next Post: «

Comments

  1. Niks said on December 24, 2014 at 11:12 am
    Reply

    Disabling javascript can also help in copying/saving images where right click is disabled . I use this method to download images from instagram .

  2. Paul(us) said on December 24, 2014 at 11:39 am
    Reply

    Martin, Thanks for again a really interesting to read and easy to understand article.

    Niks is mention this above but not answering all of main question so here is main question to you Martin:
    The only question your article leaves me with is or the above mentioned programs and also your guide
    to the actions I can follow also works with saving pictures?
    I often encounter sites who forbid me to save a/the picture(‘s) from there website so I am wondering
    are there outer methods for saving pictures from those sites?
    Or is this method working whit who I can save pictures from websites who forbid me to do so?

    1. Martin Brinkmann said on December 24, 2014 at 11:42 am
      Reply

      Yes disabling JavaScript will do that as well, provided that the images are still displayed after you disable it.

    2. Doc said on December 24, 2014 at 5:45 pm
      Reply

      You can always view *all* images used in a webpage (except those displayed by plugins like Flash) in Firefox by choosing Tools -> Page Info -> Media tab. This will also allow you to save any images.

  3. willnotbepublished said on December 24, 2014 at 11:57 am
    Reply

    Sometimes pressing shift, ctrl or alt is enough.

    1. Anonymous said on October 1, 2019 at 11:36 pm
      Reply

      dude it worked LOL control shift that is…you rock!

  4. toodess said on December 24, 2014 at 11:57 am
    Reply

    another method I use,
    just create a new bookmark, name it as you want and paste this line as URL :
    javascript:void(document.ondragstart=document.body.ondragstart=null,document.oncontextmenu=document.body.oncontextmenu=null,document.onselectstart=document.body.onselectstart=null,document.onclick=null,document.body.onclick=null,document.onmousedown=document.body.onmousedown=null,document.onmouseup=document.body.onmouseup=null,document.onbeforecopy=document.body.onbeforecopy=null,document.onbeforecut=document.body.onbeforecut=null,document.oncopy=document.body.oncopy=null);

    usualiy it works well with Firefox, I don’t have to disable javascript, just send the instruction to re-enable features supposed locked on the Web page

    1. Anonymous said on April 24, 2022 at 12:23 pm
      Reply

      That use of bookmark is the best. Thanks

  5. Tom Hawack said on December 24, 2014 at 12:40 pm
    Reply

    Here I’ve bundled two scripts found on the Web into one and built a bookmarklet called whenever a page refuses right-click and/or refuses text copy. I haven’t yet encountered a page where the bookmarklet would be ineffective. Works with Firefox, elsewhere I don’t know.
    Bookmarklet’s script : http://pastebin.com/tYiV0UYZ

    Copy the script, create a new bookmark, give it as url the script, as name as you wish, call that bookmark on those naughty pages (for those who ignore what a bookmarklet is)

  6. Dwight Stegall said on December 24, 2014 at 2:59 pm
    Reply

    Reenable Right Click.

    javascript:/*Anti%20No%20Right%20Click.%20Copyright%20(C)%20CodeHouse.com,%202004*/function%20kill(doc){doc.onmousedown=doc.onmouseup=doc.oncontextmenu=doc.onselectstart=doc.ondragstart=function(){return%20true};if(window.releaseEvents){releaseEvents(Event.MOUSEDOWN|Event.MOUSEUP);}}onerror=function(){return%20true};kill(document);if(frames.length){for(i=0;i<frames.length;++i){kill(frames[i].document);}}else{kill(document);}

    1. V S Rawat said on December 23, 2018 at 8:16 am
      Reply

      didn’t work to enable copy on
      1. Google news https://news.google.com/?hl=hi&gl=IN&ceid=IN:hi
      2. on basilisk and on palemoon http://tvwiz.in/app/app/channelBrowse/69 (on ff copy is already working o this page 2, but these 2 browsers are working on ff code, so it should work)

      when you say something earthbreaking and make us run a script, and it doesn’t do what you said it would do, we use to think whether you are a hacker and whether your said script has stolen our data from browser?

      be careful.

  7. Pants said on December 24, 2014 at 3:59 pm
    Reply

    I’ve never bothered to use it, but its been in my marklet folder on my toolbar for about 2 years

    javascript:function%20kill(d){d.onmousedown=d.onmouseup=d.oncontextmenu=d.onselectstart=d.ondragstart=function(){return%20true;};}try{kill(document);for(var%20j=0;F=frames[j];++j)kill(F.document);}catch(e){}

  8. onedeafeye said on December 24, 2014 at 7:30 pm
    Reply

    One method that has never failed me is to take a screenshot.

    1. Martin Brinkmann said on December 24, 2014 at 8:39 pm
      Reply

      Works, unless you need the text and not the information. Thanks!

      1. stilofilos said on December 27, 2014 at 9:34 am
        Reply

        There is a nice tool to convert images to text : Free OCR from http://www.paperfile.net/
        Does a great job, but needs .Net v2 and the Tesseract language pack for the language used.

        You can also save the page as a PDF, and open that one in PdfXchange viewer, which in recent versions has a very efficient and nicely working ocr tool to export selected text.

        Besides, using Firefox, i often use an addon that saves a copy of the page as it is ,apparently without scripts. From that, you can just copy whatever you want.
        Find it at https://addons.mozilla.org/en-US/firefox/addon/mozilla-archive-format/?src=search

  9. Dylan Groves said on December 24, 2014 at 8:45 pm
    Reply

    In Firefox shift+right click will always get the default menu. I learned this by accident when I was trying to make shift+right click do something and it just wouldn’t work. Not sure if Chrome has something similar.

    1. Tom Hawack said on December 24, 2014 at 9:24 pm
      Reply

      I learned something. Interesting. Many application shortcuts are unknown by many users. Shift+Right_Click on Firefox (at least) always brings up the default menu. Good to know.

      1. Martin Brinkmann said on December 24, 2014 at 9:39 pm
        Reply

        That’s really good to know. Great tip!

  10. belwanj said on December 24, 2014 at 9:15 pm
    Reply

    Change browser View/Page option-Style …. to “No Style”

    Also, often it is only the on screen visual ‘highlighting’ that is disabled — you can still highlight/copy text as normal with mouse/keyboard… you just can’t see the color/shade change on the text you select.

  11. Belga said on December 24, 2014 at 11:05 pm
    Reply

    What bothers me the most are the pages where it is not possible to use bookmarklets in the kind of “Printwhatyoulike” or “Printliminator” to create pdf-files to archive.
    All these methods don’t help in this case.
    Thanks for the tips anyway.

    1. Tom Hawack said on December 24, 2014 at 11:25 pm
      Reply

      Basically a bookmarklet should always operate correctly if javascript is not disabled. But there are some pages which have been crafted in such a way that they cannot be scanned from another site, indeed. I don’t know how they manage but I’ve noticed it, very few times, when saving a page with printfriendly.com or a dedicated bookmarklet. Also, some pdf-makers don’t handle https pages.

    2. Klaas Vaak said on February 24, 2018 at 12:30 pm
      Reply

      Reader View obviates the use of Printliminator.

  12. Ron said on December 25, 2014 at 3:39 am
    Reply

    Thanks for the tip about “Ctrl-u.” It may come in handy sometime.

  13. david chase said on December 26, 2014 at 4:11 am
    Reply

    simply use faststone capture to copy, print or save anything you want to on any site / desktop anywhere …no hassle no problem no magic…easy easy

  14. Ryko said on June 28, 2015 at 2:27 am
    Reply

    thanks..really appreciate it! good job!

  15. wings said on November 4, 2015 at 10:55 pm
    Reply

    Thanks a lot! Method 1 worked. :D

  16. Laks said on January 28, 2016 at 7:54 am
    Reply

    Thanks! Method 1 worked for me!

  17. Mischa said on February 14, 2016 at 3:26 pm
    Reply

    How to copy content of a website that won’t accept the disabling of Javascript?

    1. Martin Brinkmann said on February 14, 2016 at 3:31 pm
      Reply

      Disable JavaScript in the browser. Or, save the page, and copy it then.

  18. Roby said on April 11, 2016 at 7:40 pm
    Reply

    Ctrl + U :) Thanks!

  19. David said on May 4, 2016 at 9:07 pm
    Reply

    You can use GT Text (softocr.com). Is a totally free program for windows. And just press ALT+C and with OCR you have the blocked text.

  20. Ahmad Ahmadli said on July 2, 2016 at 10:55 am
    Reply

    In search machine or anywhere click right on website and choose print and you will able to copy

    1. Dan Dobar said on December 9, 2020 at 6:21 pm
      Reply

      Yes, you can use the print screen to copy! I was so happy to discover this today and offer it as a comment.

  21. Nasim said on August 16, 2016 at 8:36 am
    Reply

    Thanks Bro

  22. Tamara Aller said on August 20, 2016 at 11:41 am
    Reply

    Method 3 for Chrome did it for me.

    Thank you for helping me to do my job better and more efficiently. God bless.

  23. loliconer said on September 22, 2016 at 8:49 pm
    Reply

    u can try reader view mode in firefox its easy

    1. Klaas Vaak said on February 24, 2018 at 12:31 pm
      Reply

      There are web pages that disable that feature.

  24. Carmin said on October 4, 2016 at 9:59 am
    Reply

    Thank you very much!! Really helpful and saves me a lot of time.

  25. Anil Tiwari said on October 27, 2016 at 2:33 am
    Reply

    Thanks Man !!!

  26. Robert Miles said on November 14, 2016 at 10:25 pm
    Reply

    I *really* hate it when sites do this to me. Any web publisher who is attempting to plagiarize will already know how to bypass this, and anyone who doesn’t can search for a solution in 30 seconds. All it serves to do is make me feel like an idiot when all I’m really trying to do is select a few words to use as a search term so I don’t have to manually type it. I ended up using RightToClick as an alternative to jumping into the inspector every time.

  27. Mboo Kubwa said on November 27, 2016 at 9:52 pm
    Reply

    This is priceless! Thank you all

  28. Ratna said on December 21, 2016 at 10:25 am
    Reply

    Hi Martin,

    Nice article and it is very useful!

  29. angela said on January 28, 2017 at 10:01 pm
    Reply

    I used to use the righttocopy extension but the person took it off. What else can I use for an extension on firefox to copy and paste sites that have disabled it?

  30. greg said on January 30, 2017 at 7:33 pm
    Reply

    in firefox one can use “reader mode” like described here http://useitsmart.com/copy-text-site-blocks-coping

  31. karel said on March 2, 2017 at 12:38 pm
    Reply

    This method worked for me on chrome:

    Try to print page, then you can select the text in the preview window.

    1. Ace said on April 14, 2018 at 4:58 pm
      Reply

      Thanks for this tips.. only way for me to copy some info on a page :D

    2. Ace said on April 14, 2018 at 5:00 pm
      Reply

      Thanks alot. Finally this worked for me to copy some text on page . You saved my day

  32. Anonymous said on April 10, 2017 at 7:38 pm
    Reply

    Thanks a ton!

  33. Shri said on April 23, 2017 at 11:59 am
    Reply

    thanks brotha!

  34. Akshay said on May 11, 2017 at 10:20 am
    Reply

    Thank you Martin. It totally helped me for my project work.

  35. Dhruv Patel said on May 11, 2017 at 9:12 pm
    Reply

    Thanks a lot…

  36. Any said on July 13, 2017 at 12:44 am
    Reply

    Make a bookmark and use this as URL:
    javascript:void(document.oncontextmenu=null); document.body.onselectstart = function() {return true;};

    Tested with Chrome.

  37. Ankit said on October 15, 2017 at 5:49 am
    Reply

    Wastage of time.. literally of no use.

  38. jason said on October 29, 2017 at 10:26 am
    Reply

    it works , thanks

  39. DovahkiinSenpai said on November 19, 2017 at 11:26 am
    Reply

    Sometimes, if you can highlight the text then you have the option to search Google for the text you’ve highlighted and then click back into the searchbar and your search history should pop up with the last searched item being the text you’ve highlighted on the previous website.

  40. kedaxx said on November 29, 2017 at 9:32 pm
    Reply

    RightToClick Chrome extension worked perfectly for me..

    1. PR said on June 25, 2019 at 5:43 am
      Reply

      Thanks so much for this. It saved me from taking several screen shots.

  41. Cici Grasa said on December 13, 2017 at 1:40 am
    Reply

    The turning off javascript didn’t work for me…

  42. Musa said on January 24, 2018 at 11:20 am
    Reply

    Hello, I have a browser made by Javascript disabling copying from it, how can I copy it. It’s not among the browsers you listed above. Can you help please

  43. n0h4ckz said on February 11, 2018 at 6:06 pm
    Reply

    thx helped me a lot

  44. Matyas said on March 29, 2018 at 6:11 am
    Reply

    One word, LEGEND!

  45. Anonymous said on May 26, 2018 at 10:06 am
    Reply

    thank you sooooooooooooooooooooooooooooooo much <3

  46. ayieG said on July 2, 2018 at 1:36 pm
    Reply

    Thank you..

  47. Kumar said on July 14, 2018 at 9:48 am
    Reply

    Paste Pro extension in Chrome does it all .

  48. Dominik Sladký said on December 2, 2018 at 11:44 am
    Reply

    I tried all of this things, but nothig works.

  49. Hank said on December 31, 2018 at 3:43 pm
    Reply

    Used the Mozilla / Firefox option – Worked Perfectly – Thanks!!!

  50. Adrian said on January 31, 2019 at 9:04 am
    Reply

    The best way is open the website in Opera and right click to select “save to PDF”. There you can select all the texts you need and copy. :)

  51. Anonymous said on May 13, 2019 at 4:56 pm
    Reply

    body, html{
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    }

  52. Kuê龜ê said on July 15, 2019 at 4:33 pm
    Reply

    Extensions above are not working.
    Use it!!!!!!

    Enable right click
    https://chrome.google.com/webstore/detail/enable-right-click/gpeddepmnbmkjfnhifmggnjdggibjjkf/reviews?authuser=1&hl=en

  53. lalit said on August 28, 2019 at 9:55 am
    Reply

    thank u very much

  54. DustieRose said on October 8, 2019 at 5:36 am
    Reply

    As always Martin, I learn more useful, how-to information on your site than almost any other by far overall, for Linux, and Windows; which I do pass on to my customers whom I do computer work for when the occasion presents itself. I also want to express my gratitude for your years of sharing your experience and knowledge. I have the utmost professional respect for people like yourself who do what they do for the love of it.
    (please feel free to leave the following out if it doesn’t fit the article)
    I do try to support my top sites as money allows as much as I can. I will continue to follow the sites, yours is on my top 5, that I read faithfully before most.

  55. Fichfield said on October 8, 2019 at 6:13 pm
    Reply

    Thank a lot, The info was very helpful.

  56. Howgeekis said on March 23, 2020 at 9:09 am
    Reply

    Use a proxy website that allows you to disable JavaScript before opening the site that s of interest to you. Just go to your search engine and find a free proxy website.

  57. PANAMA PATRICK said on April 15, 2020 at 9:05 pm
    Reply

    WHAT WILL WORK WITH BRAVE BROWSER?

    1. Arin Saxena said on May 15, 2020 at 8:26 pm
      Reply

      i tried to use right to copy and it worked for my brave. note all extensions of chrome can run on brave.

      right to copy

      https://chrome.google.com/webstore/detail/absolute-enable-right-cli/jdocbkpgdakpekjlhemmfcncgdjeiika/related?hl=en

  58. Worries said on April 23, 2020 at 2:33 am
    Reply

    Any luck on a Chrome workaround? I used to use Firefox, but it bogged both my systems and crashed randomly, no matter the update. So I switched and still getting used to it.

  59. Arin Saxena said on May 15, 2020 at 8:24 pm
    Reply

    Omg! I tried to disable javascript but site didnt run so i had to use the extensions RIGHT TO COPY. and it worked. thanks so much.

  60. Phoe said on May 25, 2020 at 11:28 pm
    Reply

    Worked on Chrome. Thx a lot !

  61. Paul Merrifield said on June 9, 2020 at 11:33 pm
    Reply

    “JavaScript” isn’t even in the settings for Chrome.

  62. Leila Carlyle said on June 17, 2020 at 5:03 pm
    Reply

    I use Pocket – https://getpocket.com – to save web pages (rather than bookmarking them). When I encounter a page that won’t let me right click or highlight text, I save it to Pocket. Then I go to my Pocket list, open the link, and copy it from there. Don’t click on ‘View original’ or you’ll be back where you started. Just copy from the cached page. Works for both text and images.

  63. anonymous said on August 31, 2020 at 1:15 pm
    Reply

    thanks for all the help but it still doesn’t work for me and i’m extremely desperate to copy and paste for some really important images i need, could anyone help?

  64. kadi said on September 20, 2020 at 9:57 am
    Reply

    Thanks bro , you helped me a lot 😇

  65. shahar said on October 31, 2020 at 2:34 am
    Reply

    the problem is that some sites won`t loading when you disable JavaScript

  66. Dan Dobar said on December 9, 2020 at 6:23 pm
    Reply

    Chose the print page option and copy from the print preview box. It is easy, and it works!

    1. Muhammad Azeem said on October 2, 2021 at 8:25 pm
      Reply

      save as pdf and enjoy

  67. Anonymous said on October 21, 2021 at 11:25 pm
    Reply

    On Chrome something that works for me is to do ctrl+a then ctrl+c and paste onto a word doc. Then just copy and paste what you want from there! More useful if you want to copy ALOT of stuff because.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.