To disable JavaScript in desktop Chrome, open Settings > Privacy and security > Site settings > JavaScript, then select Don't allow sites to use JavaScript. Reload your open webpages so they use the new setting. These steps apply to Chrome on Windows, macOS, Linux, and ChromeOS.
You can also block individual websites, turn off JavaScript in Chrome for Android, or temporarily disable it in a desktop tab through DevTools. If you want some websites to keep using JavaScript, use site exceptions to control which ones are allowed.
The short version
- Desktop default: Select Don't allow sites to use JavaScript in Chrome's JavaScript settings and reload your webpages.
- Individual websites: Use site permissions or the JavaScript exception lists to block selected sites.
- Android: Open Settings > Site settings > JavaScript and turn off JavaScript.
- Temporary blocking: DevTools can disable JavaScript for the inspected tab while DevTools stays open.
| Method or control | Where it works | What it does |
|---|---|---|
| Desktop JavaScript setting | Desktop Chrome | Sets a persistent default for websites |
| Address bar shortcut | Desktop Chrome | Opens the same persistent setting |
| Desktop exception lists | Desktop Chrome | Blocks or allows selected websites |
| Current website permissions | Desktop Chrome | Saves a block for that website |
| Android JavaScript switch | Android phones and tablets | Changes the default, subject to exceptions |
| Android site exception | Android phones and tablets | Blocks or allows a specified website |
| DevTools command | Desktop Chrome with DevTools available | Temporarily blocks JavaScript in the inspected tab |
| DevTools checkbox | Desktop Chrome with DevTools available | Temporarily blocks JavaScript in the inspected tab |
| Alternative DevTools entry points | Desktop Chrome with DevTools available | Opens DevTools before you select a blocking control |
| JavaScript Toggle On and Off | Desktop Chrome with extensions permitted | Adds a toolbar toggle with domain exceptions |
| Chrome Web Store product page | Desktop Chrome with extensions permitted | Installs the toolbar extension |
| Google Admin | Managed desktop Chrome and supported managed Android configurations | Sets the managed default with administrator privileges |
DefaultJavaScriptSetting policy | Managed desktop Chrome and Android | Enforces the default through policy deployment |
JavaScriptBlockedForUrls policy | Managed desktop Chrome and Android | Blocks sites matching specified URL patterns |
Disable JavaScript for websites on desktop
Open Chrome's More menu and select Settings. Choose Privacy and security > Site settings, then select JavaScript under Content. Select Don't allow sites to use JavaScript, then reload your open webpages.
You can reach the same persistent setting directly from the address bar. Enter the following address and press Enter.
chrome://settings/content/javascriptSelect Don't allow sites to use JavaScript, then reload your open webpages. Review Allowed to use JavaScript if you want JavaScript blocked everywhere, because allowed sites are exceptions to the default block.
If a website continues using JavaScript, check the allowed-site exceptions and reload the page. On a managed browser, your administrator can restrict these settings. Changing the managed default requires an administrator to use the organization's Chrome policy controls.
Block JavaScript on selected websites
To block the website you currently have open, select View site information to the left of its address, then select Site settings. Find JavaScript and choose Block. Chrome saves this site permission automatically, but you still need to reload the website.
To enter a block through Chrome's settings, open Settings > Privacy and security > Site settings > JavaScript. Under Not allowed to use JavaScript, select Add, enter the website address, and select Add again. This blocks the specified website without changing the default for every website.
You can also block JavaScript by default and allow selected websites. Select Don't allow sites to use JavaScript, then use Add under Allowed to use JavaScript to enter a permitted website. The list you choose determines whether the exception blocks or allows JavaScript.
Turn off JavaScript on Android
On an Android phone or tablet, open Chrome's More menu and tap Settings. Under Advanced, tap Site settings > JavaScript, then turn off JavaScript. Reload the webpage after changing the switch.
To block only an individual website, leave JavaScript on and tap Add site exception. Enter the website address and tap Add. With the main switch on, the exception blocks JavaScript for that website.
With the main switch off, the same Add site exception control allows JavaScript for the website you add. Check the switch position before adding an exception. Review existing exceptions if you want all sites blocked, since an allowing exception overrides the default for that site.
Disable JavaScript temporarily in a desktop tab
Use DevTools when you want JavaScript disabled temporarily in the tab you are inspecting. The block lasts while DevTools remains open, and closing DevTools ends it. Opening DevTools alone does not disable JavaScript; you must also select the command or checkbox.
On Windows or Linux, press Ctrl + Shift + I to open DevTools. On macOS, press Command + Option + I. For a menu route, open Chrome's More > More Tools > Developer Tools.
With DevTools focused, press Ctrl + Shift + P on Windows or Linux, or Command + Shift + P on macOS. Type javascript in the Command Menu, select Disable JavaScript, and press Enter. Reload the webpage and keep DevTools open for as long as you need the temporary block.
If you prefer a checkbox, open the Settings gear inside DevTools and select Preferences. Scroll to Debugger and check Disable JavaScript. Reload the webpage and leave DevTools open.
If JavaScript starts running again after you close DevTools, the temporary block has ended. To keep it blocked beyond that session, use Chrome's desktop JavaScript setting or the website's saved permission.
Add a toolbar toggle for frequent changes
On desktop Chrome with extensions permitted, JavaScript Toggle On and Off provides a toolbar button for changing the setting. Open its Chrome Web Store product page and select Add to Chrome. If Chrome prompts you to approve installation, select Add extension.
Click the extension's toolbar action button to block JavaScript, then click it again to restore JavaScript. The extension refreshes the current tab automatically and supports domain exceptions. If your organization restricts extensions, the built-in controls are another option, subject to its settings policies.
Set the managed default in Google Admin
If you administer managed Chrome, you can set the JavaScript default through Google Admin. This applies to managed Chrome on Windows, macOS, Linux, ChromeOS, and supported managed Android configurations. You need administrative privileges to make the change.
Sign in to Google Admin with an administrator account, then open Devices > Chrome > Settings. User & browser settings opens by default. For Chrome Enterprise Core, open Chrome browser > Settings instead.
Select the organizational unit or group, find JavaScript, and select Do not allow any site to run JavaScript. Click Save, and use Override if required for the organizational unit.
Deploy JavaScript policies to managed browsers
If you manage Chrome through your organization's policy deployment system, configure DefaultJavaScriptSetting as integer 2. This corresponds to Do not allow any site to run JavaScript. Deploy the policy to the intended devices or profiles.
To block specified sites, deploy JavaScriptBlockedForUrls as a list of URL patterns. For example, [*.]example.edu covers that domain and its subdomains. These policies apply to managed Chrome on Windows, macOS, Linux, ChromeOS, and Android.
If you need a global default for every website, configure DefaultJavaScriptSetting instead.
Frequently Asked Questions
Can I open DevTools with a function key?
Press F12 on Windows or Linux, or Fn + F12 on macOS, though function-key behavior depends on your keyboard. You still need to select Disable JavaScript after opening DevTools.
Can I open DevTools directly from something on a webpage?
Right-click a webpage element and select Inspect to open DevTools. Then use its Disable JavaScript command or checkbox and reload the webpage.
Does JavaScript Toggle On and Off need permission for Incognito?
Yes, Incognito access requires separate permission for the extension. Installing it alone does not grant that access.
Can I still use an older Manifest V2 script blocker?
Manifest V2 extensions are unsupported in Chrome 139 and later, so use Chrome's built-in JavaScript controls or a current compatible extension. Older instructions for re-enabling Manifest V2 extensions no longer apply. An extension mentioned in older instructions may have migrated, so its age alone does not establish incompatibility.