How do I enable or disable JavaScript in my browser?

Updated: 02/01/2021 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 or disable 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

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

Google Chrome

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. To the right of the Allowed option, click the toggle to the on Chrome toggle On position position to enable JavaScript or the off Chrome toggle Off position position to disable JavaScript.

Toogle JavaScript on and off in Chrome.

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 of the website for which you'd like to allow or block JavaScript.

Firefox

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

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 Site permissions.

Site permission selector.

  1. 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.

Edge

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

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 that appears.
  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 need to 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 that appears, 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

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 Preferences.

Safari macOS preferences

  1. In 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

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

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 that appears.

Settings seletor in Opera.

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

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. To the right of the Allowed option, click the toggle to the on Opera toggle On position position to enable JavaScript or the off Opera toggle Off position position to disable JavaScript.

Additional information