Website Tips: Disabling Inspect Tool & Developer Menu

Sometimes us website owners dislike when a visitor uses the inspect element tool aka the developer tool (accessible via the F12 Key), or copies website content via copy pasting, for various reasons. Fortunately, we have somewhat of a solution for you.

If you would like to disable the Inspect Element Tool, Right Click, and F12 Developer Menu, on your website, this will require a simple JavaScript-script. It's totally safe, it doesn't reach out to any 3rd parties or online services, it's simple, and works easily. This will also help prevent people from stealing your content by copy-pasting it, as users will not be able to select a bunch of text and copy it. All control commands are also disabled, such as control-C (copy), control-V (paste), etc. 

We've published the script onto 0bin for you to use. All you have to do is copy the highlighted code (everything from <script> to </script> including <script> and </script>) and paste it at the end of your website code. It's that easy.

The downside is, users can still view the source code to your website via view-source in their browser. For example, if my website is, anyone can type view-source: into their browser, and the HTML Source code will display. There's simply absolutely no way to hide this, and the best you can do it disable inspect element, developer console, and right click.

Here is the link to the script on 0bin:


Why do I need this?:

Sometimes, actually, very often, visitors of websites steal website content by copying the content (hovering & selecting with mouse then copying via right click or ctrl-v). On other occasions, visitors want to open the inspect element tool/developer menu to snoop around. This script will help prevent that. Of course, not entirely, as that is literally impossible, but it definitely helps a TON. By using this script on your website, users cant hover over content and copy it, users cant right click to then select inspect element (or any previously-available option), and users cannot toggle the developer menu with the F12 Key. Of course, they will still be able to open the developer menu/dev tools via the browser options (three dots on the top right on Chrome), but this script does a good job at hiding every other option. In other words, if you're looking for a prevention, it's for sure better to have this script then to not have it.


How do I know it's safe?:

The script is very simple and doesn't reach out to any servers or 3rd parties. You can verify this with any web developer.


Thanks for reading and we hope you found this helpful!




Related posts