How to Disable JavaScript on a Mac

To disable JavaScript on a Mac, turn off the browser’s JavaScript setting, usually Allow JavaScript in Safari, or the JavaScript permission in Chrome or Firefox. This prevents websites from running browser-based code used for interactive menus, forms, sign-ins, embedded media, and dynamic page content. Disable it temporarily when testing a site or isolating a script-related problem; leaving it off globally will break many websites.

What Disabling JavaScript Does

JavaScript is code that a website sends to your browser for features such as buttons, search boxes, expandable menus, checkout forms, analytics, and live updates. Turning it off does not remove files from your Mac or uninstall a programming language. It only changes whether the selected browser runs JavaScript from websites.

Expect some pages to look incomplete or stop responding. A page may still display text and images, but buttons may do nothing, forms may not submit, and sign-in flows may fail. Apple specifically notes that websites can fail to work properly without JavaScript because sites use it for buttons, forms, and other content.

Use a browser-wide block when you need to test general no-JavaScript behavior. Use a site-specific block when only one site is causing trouble.

Choose the Right JavaScript Block

Choose the narrowest option that accomplishes what you need.

Your Goal Best Method What It Affects
Test whether a Safari page needs scripts Disable JavaScript in Safari Security settings All Safari tabs and sites
Block scripts on one Chrome website Add the site to Chrome’s Block list That site in Chrome
Test one Chrome tab during development Use Chrome DevTools The current testing session
Disable scripts in Firefox Change javascript.enabled All Firefox sites

For routine browsing, a site-specific block is less disruptive than a browser-wide JavaScript shutoff.

How to Disable JavaScript in Safari on Mac

Safari’s own settings are the simplest way to disable JavaScript for Safari. The change applies across Safari, including other open tabs, so save unfinished web forms before changing it.

Step 1: Open Safari Security Settings

  1. Open Safari.
  2. In the menu bar, select Safari > Settings > Security.

Apple’s Safari Security settings include the control for allowing or blocking JavaScript.

Step 2: Turn Off JavaScript

  1. Find the Enable JavaScript checkbox in the Security settings.
  2. Clear the checkbox to disable JavaScript.
  3. Close the Settings window.

Safari will no longer run JavaScript from websites until you enable the setting again.

Step 3: Reload and Test the Target Page

  1. Return to the website you want to test.
  2. Reload the page.
  3. Check the part you are diagnosing, such as a menu, form, login button, or embedded widget.

When you are finished testing, return to Safari > Settings > Security and select Enable JavaScript again. Reload any affected sites after restoring it.

Disable JavaScript in Google Chrome

Chrome gives you three useful choices: block JavaScript everywhere, block it on selected sites, or temporarily disable it through developer tools.

Block JavaScript for All Chrome Sites

  1. Open Chrome Settings.
  2. Go to Settings > Privacy and security > Site settings.
  3. Under Content, open JavaScript.
  4. Select Don't allow sites to use JavaScript.
  5. Reload the page you want to test.

This is a browser-wide setting. Restore normal behavior by returning to the JavaScript settings and allowing sites to use JavaScript, then reload affected pages.

Block JavaScript on One Chrome Site

For a troublesome site or a focused compatibility test, use Chrome’s site block list rather than disabling scripts everywhere.

  1. Open Settings > Privacy and security > Site settings, then open JavaScript under Content.
  2. In the Block section, select Add.
  3. Enter the site address you want to block and confirm it.
  4. Reload that site.

The site remains in Chrome’s Block list until you remove it. Delete the entry from the Block list when you want that site to run JavaScript again.

Temporarily Disable JavaScript With Chrome DevTools

Use Chrome DevTools to temporarily disable JavaScript for the site you are testing without changing Chrome’s normal permissions.

  1. Open the target website in Chrome.
  2. Open Chrome DevTools with Command+Option+I.
  3. In DevTools, open the Command menu with Command+Shift+P.
  4. Type Disable JavaScript, select the Disable JavaScript command, and press Enter.
  5. Reload the page and test its no-JavaScript behavior.

Reopen the Command menu and choose Enable JavaScript when you are done, then reload the page. Closing DevTools also ends this temporary testing setup.

Disable JavaScript in Firefox

Firefox does not provide a normal Settings-page switch for JavaScript. Instead, use Firefox’s advanced configuration editor. This changes JavaScript behavior across Firefox, so use it carefully and restore it when testing is complete.

  1. Enter this address in Firefox’s address bar to open the advanced configuration editor:
about:config
  1. Accept Firefox’s warning if it appears.
  2. Search for:
javascript.enabled
  1. Change the setting from true to false.
  2. Reload the site you want to test.

To enable JavaScript again, return to about:config, find javascript.enabled, change it back to true, and reload your affected tabs.

Confirm JavaScript Is Disabled and Restore It Safely

A successful JavaScript block does not necessarily make a page blank. Instead, look for interactive features that no longer work:

  • A button does not open a menu or dialog.
  • A form does not validate or submit.
  • A page displays static text but does not load live content.
  • A sign-in, checkout, or search interface stops responding.
  • A site displays a message that JavaScript is required.

If a website stops working after your test, restore JavaScript in the same browser where you disabled it and reload the page. If only one site is affected in Chrome, remove that site from the Block list rather than changing Chrome’s global JavaScript preference.

Disabling JavaScript can help isolate a broken script, but it is not a complete privacy or security solution. Keep your browser updated, review site permissions, and use content-blocking or privacy tools if your goal is to limit tracking or ads without breaking essential site functions.

Frequently Asked Questions

Does Safari Enable JavaScript?

Safari has an Enable JavaScript control in Safari > Settings > Security. When that checkbox is selected, Safari can run JavaScript from websites; when it is cleared, Safari blocks it. Many modern websites require JavaScript for forms, navigation, and interactive content.

Can I Delete JavaScript From My Mac?

No. JavaScript is not a single application you can delete from macOS. It is code that browsers can execute when loading websites, so disabling it in Safari, Chrome, or Firefox is the practical way to stop it from running.

How Do I Turn JavaScript Back On in Safari?

Open Safari > Settings > Security and select Enable JavaScript. Then reload the website that was failing. Buttons, forms, and other interactive content should work again if JavaScript was the cause.

How Do I Disable JavaScript on an iPhone?

On an iPhone, go to Settings > Apps > Safari > Advanced and turn off JavaScript. Apple lists this setting for Safari on iPhone and iPad. Turn it back on from the same screen if sites stop loading or searching correctly.

Is Java the Same as JavaScript in Firefox?

No. Java and JavaScript are different technologies. In Firefox, the setting named javascript.enabled controls website JavaScript; changing it from true to false disables scripts in Firefox without uninstalling Java from your Mac.