How to enable or disable JavaScript in a browser

Updated: 07/31/2022 by Computer Hope
JavaScript or JS logo

Today, nearly all Internet browsers have JavaScript installed and enabled by default. Many features of a website are enhanced or made possible by JavaScript programs that run in your browser. Consequently, if you disable JavaScript, certain websites may not function as intended. To learn how to enable (unblock) or disable (block) JavaScript, select your browser from the list below and follow the steps.

Note

Java and JavaScript are different. If you need information about Java or any of its versions, see our Java definition.

Tip

To check if JavaScript is currently enabled, see our JavaScript definition for an example script that runs in a JavaScript-enabled browser.

Google Chrome logo

Google Chrome

To enable or disable JavaScript in Google Chrome, follow these steps.

  1. Open Google Chrome.
  2. In the upper-right of the Chrome window, click the Chrome menu icon. icon.
  3. Select Settings from the drop-down menu.

Settings selector in Chrome.

  1. On the left side of the screen, click Privacy and security.

Privacy and security selector.

  1. Expand the Site Settings option.

Chrome site settings selector.

  1. On the Site Settings page, scroll to the bottom of the screen. Under the Content section, click the JavaScript option.

Chrome JavaScript selector.

  1. Under Default behavior, click the Sites can use Javascript radio button to enable JavaScript, or click the Don't allow sites to use Javascript radio button to disable JavaScript.

Chrome settings to allow or not allow JavaScript

Allow or block JavaScript on specific websites

In the Allow or Block section, click the Add button in Chrome. button. Then, type or paste the URL (Uniform Resource Locator) of the website that you want to allow or block JavaScript.

Firefox logo

Mozilla Firefox

To enable or disable JavaScript in Firefox, follow these steps.

  1. Open Firefox.
  2. In the address bar, type about:config and press Enter.

About config window in Firefox.

  1. Click the Accept the Risk and Continue button in the center of the screen.

Accept Risk button

  1. In the Search preference name text field, type javascript.enabled.

Find JavaScript config entry in Firefox

  1. For the javascript.enabled search result, click the Toggle Firefox toggle for JavaScript icon on the far right. The true value changes to false to indicate JavaScript is disabled.
  2. To re-enable JavaScript, repeat these steps, changing false to true.
Microsoft Edge logo

Microsoft Edge

To enable or disable JavaScript in Edge, follow these steps.

  1. Open Microsoft Edge.
  2. In the upper-right corner of the screen, click the Edge more icon.
  3. At the bottom of the Settings and more menu, select Settings.

Edge settings selector.

  1. On the left side of the screen, select Cookies and site permissions.
  2. Under the Site permissions section, click the box labeled JavaScript.

JavaScript selector in Edge.

  1. On the Site permissions / JavaScript screen, use the toggle switch to enable and disable JavaScript.

JavaScript toggle in Edge.

Microsoft Edge logo

Microsoft Edge Legacy

By default, JavaScript is enabled in the Microsoft Edge Legacy browser. The Creators Update for Windows 10 removed the ability to manually enable or disable JavaScript.

Internet Explorer logo

Internet Explorer

To enable or disable JavaScript in Internet Explorer, follow these steps.

  1. Open Internet Explorer.
  2. Click Tools IE tools in the upper-right corner of the browser window.
  3. Select Internet Options from the drop-down menu.
  4. In the Internet Options window, click the Security tab.
  5. In the Security tab, click Custom Level button.
  6. Scroll down the list (close to the bottom) and locate Active Scripting. Select Disable, Enable, or Prompt to adjust your JavaScript settings.
Android logo

Android phone & tablet

To enable or disable JavaScript on an Android mobile device, you must access the browser settings. As there are many different browsers on Android devices, you may need to use some intuition to access the settings. The following instructions are for Google Chrome.

  1. Open Google Chrome.
  2. In the upper-right corner, click the Menu icon on Google Chrome mobile. icon.
  3. On the drop-down menu, tap the Settings option.
  4. Under the Advanced section, tap Site settings.
  5. Tap JavaScript.
  6. Move the slider Toggle button in Google Chrome. to toggle JavaScript on or off.
Safari logo

Safari (macOS)

To enable or disable JavaScript in Safari on an iMac or MacBook, follow these steps.

  1. Open Safari.
  2. In the menu bar, click the Safari selector selector and choose Settings....

Safari Settings selector.

  1. Click the Security tab at the top of the Advanced window.
  2. On the Security tab, next to Web content, click the check box next to Enable JavaScript box to toggle it on or off.

Safari macOS disable JavaScript

Apple logo

Safari (iPhone & iPad)

To enable or disable JavaScript in Safari for iOS or iPadOS, follow these steps.

  1. Tap the Settings Settings icon on iOS. icon on the home screen.
  2. On the Settings screen, scroll down and tap Safari.
  3. On the Safari screen, scroll down to the bottom and tap the Advanced option.
  4. On the Advanced screen, tap the toggle to the on iOS toggle On position position to enable JavaScript or the off iOS toggle Off position position to disable JavaScript.
Opera logo

Opera

To enable or disable JavaScript in the Opera browser, follow these steps.

  1. Open Opera.
  2. Click Customize and control Opera Menu button in Opera. in the upper-left corner of the browser window.
  3. Select Settings from the drop-down menu.

Settings selector in Opera.

  1. On the left side of the tab that appears, click Privacy & security.

Privacy and security selector in Opera.

  1. In the Privacy and security section, click Site Settings.

Site settings selector in Opera.

  1. On the Site Settings page, under the Content section, click the JavaScript option.

JavaScript selector in Opera.

  1. In the Default behavior section, click the circle next to Sites can use Javascript to turn it on or Don't allow sites to use Javascript to turn it off.

Enabling or disabling JavaScript in Opera.