How to Disable JavaScript in Google Chrome

The popular programming language can be a security risk

JavaScript is a popular text-based programming language commonly used on the internet. Most websites need JavaScript for all their bells and whistles to work. This includes advertisements. If you want to block ads on the pages you visit, or if you have technical issues in Chrome, you may want to disable JavaScript. You can block it completely or disable it on a site-by-site basis. We'll show you how.

Lifewire also has guides on how to disable JavaScript in Firefox, Safari, and Internet Explorer.

Why Disable JavaScript?

There are several reasons why you may want to disable JavaScript code from running in a browser. The biggest reason is for security. JavaScript can present a security risk because it's code a computer executes. This process can be compromised and used as a means to infect a computer.

You may also want to disable JavaScript because it's malfunctioning on a site and causing problems with the browser. Malfunctioning JavaScript could prevent a page from loading or cause the browser to crash. Disabling JavaScript may allow you to view content on a page, only without the added functionality it usually provides.

Finally, if you administer a website, you may need to disable JavaScript to troubleshoot issues. For example, if you use a content management tool like WordPress, JavaScript code or a plug-in using JavaScript might require you to disable it to identify and fix the problem.

How to Disable JavaScript in Chrome

Follow these steps to disable JavaScript in the Google Chrome browser:

  1. Open the Chrome browser and select the main menu button, which appears as three vertically-aligned dots located in the upper-right corner of the browser window.

    The More menu in Safari
  2. Select Settings. The Chrome settings display in a new tab or window, depending on your configuration.

    Settings in Chrome
  3. Under the Privacy and security section, select Site Settings.

    The Site Settings item in Chrome settings
  4. Under Content, select JavaScript.

    The JavaScript option in Chrome settings
  5. Turn off the toggle switch disable JavaScript in Chrome.

    The JavaScript switch in Chrome

How to Enable or Disable JavaScript Only on Specific Pages

Blocking JavaScript can disable functionality on websites, and may make some websites unusable. Blocking it in Chrome isn't an all-or-nothing setting, though. You can choose to block specific sites, or, if you block all JavaScript, set exceptions for specific websites you define.

You can find these settings in the JavaScript section of the Chrome settings. Beneath the switch to disable all JavaScript are two sections, Block and Allow.

  • In the Block section, select Add to specify the URL for the page or site you want to disable JavaScript. Use the Block section when the JavaScript switch is set to enabled (see above).
  • In the Allow section, select Add to specify the URL of a page or site on which you want to allow JavaScript to run. Use this when the toggle switch is off to disable all JavaScript.

On older versions of Chrome, the JavaScript section has a Manage exceptions button, which allows you to override the radio button settings for specific user-defined domains or individual pages.