Skip to content

Allow or Block JavaScript in Chrome on the Computer

Do you need to block or allow JavaScript execution in the Chrome browser? Learn how to manage JavaScript settings for websites.

Most modern websites use JavaScript to create an interactive website experience. However, this JavaScript can be misused by hackers to inject hacking scripts.

Hence, the Chrome browser has the feature to allow or disallow the JavaScript execution for all the websites or customize it further to selected sites.

In this guide, we have shared the steps to manage the JavaScript settings in Google Chrome on a computer.

Block JavaScript for Sites

Chrome browser has JavaScript enabled by default, but you can disable it from the settings page. Just turn off the JavaScript toggle to disable and block the execution of JavaScript. Here are the steps to follow:

  1. Launch the Chrome browser on the Computer.
  2. Click on the More vertical 3-dots icon menu and select Settings from the menu list.
  3. Scroll down to the Privacy and Security section and select the Site settings from the menu.
  4. Choose the JavaScript option within Site settings.
  5. Click on the toggle to Block the JavaScript.
    JavaScript blocked on chrome computer

It will completely block JavaScript for all the websites. If you want to block JavaScript for any particular website or list of websites, you can add them under the Block section.

All websites listed in the Block section will automatically be blocked from running the JavaScript code.

Allow the JavaScript Execution

If you have already blocked the JavaScript and the website is not loading correctly, then problem may be with JS settings. In that case, you should allow the execution. Here are the steps to follow:

  1. Launch Google Chrome on your computer.
  2. Click on the More vertical 3-dots icon menu list and select Settings menu.
  3. Scroll down to the Privacy and Security section, and select the Site settings from the menu.
  4. Choose the JavaScript option within Site settings.
  5. Click on the toggle button to Allow the JavaScript.
    Allow JavaScript on chrome computer

It will allow all the websites to run the JavaScript code on the browser and execute the function within the code block. However, if you want to allow JavaScript execution on a few websites, you can find all the URLs in the Allow section.

Allow JavaScript on website URL in chrome computer

The website in the allow section will run the JavaScript code irrespective of the main switch.

Bottom Line

We can easily block the JavaScript on selected sites or allow the execution in the Chrome browser.

If you block the JavaScript execution, the website might not run as expected. Perhaps, you should block only the untrusted sites that you are willing to visit.

Similarly, you can allow or block JavaScript in Chrome browser on Android. You allow selected sites to enable JavaScript or block them by adding them to the Block bucket.

Please share the article if you find it helpful:

Disclosure: This page may contain affiliate links, which means we may receive compensation for your purchases; of course at no extra cost to you (indeed, you may get special discounts).
Kushal Azza

Kushal Azza

Kushal Azza is a Google Certified IT Professional, Digital Content Creator, and Go-To Digital Marketer with Engineering Degree. He has over a decade of experience solving tech problems, troubleshooting, and innovating digital solutions. Follow him on Twitter and LinkedIn.

Leave a thought or feedback

Please leave a descriptive comment or feedback with your real name. Our human moderator vets every comment, and it may take 24 to 48 hours to get published or rejected.

Your email address will not be published, and we will never spam your inbox. Required fields are marked *