To disable JavaScript in Safari on a Mac, open Safari, choose Safari > Settings (called Preferences in older macOS versions), click Security, and uncheck Enable JavaScript. The change applies immediately to new page loads. Check the box again to turn JavaScript back on.
Many websites depend on JavaScript for menus, sign-in, video, and shopping, so expect some sites to break while it’s off.
Quick Answer
Safari > Settings > Security > uncheck Enable JavaScript.
Turn Off JavaScript in Safari
- Open Safari.
- In the menu bar, click Safari > Settings, or press Command + , (comma).
- Click the Security tab.
- Uncheck Enable JavaScript.
- Close the window and reload any open pages.

In some older versions, the checkbox was on the Advanced or Security pane of Preferences; the name is the same.
Temporarily Disable JavaScript for Testing
If you only need JavaScript off for a moment, turn on the Develop menu (Safari > Settings > Advanced > Show features for web developers), then use Develop > Disable JavaScript. Uncheck it when you’re done.
What Happens With JavaScript Off
| You’ll notice | Why |
|---|---|
| Fewer pop-ups and moving ads | Many are driven by scripts |
| Broken menus, buttons, and forms | Interactive features use JavaScript |
| Web apps won’t load | Email, maps, and online editors need scripts |
| Faster, simpler article pages | Less code runs on each page |
Better Options for Most People
- Block pop-ups: Safari > Settings > Websites > Pop-up Windows.
- Per-site settings: The Websites tab lets you control pop-ups, camera, microphone, and more for individual sites.
- Content blockers: Safari extensions from the App Store can block ads and trackers without breaking every site.
- Reader: Click the Reader icon in the address bar for a clean article view.
You can also set Safari to clear Safari history automatically every week.
Troubleshooting
- The checkbox is grayed out: A configuration profile from work or school may manage Safari.
- A site still runs scripts: Reload the page; already-open pages aren’t affected until they reload.
- Doing this on iPhone? See how to turn off JavaScript in Safari on iPhone, or turn it back on.
Frequently Asked Questions
Is it safe to disable JavaScript?
Yes, but it’s rarely necessary. Keep Safari and macOS updated for security instead.
Can I disable JavaScript for one website only?
Safari doesn’t offer that setting. A content-blocking extension can help.
Does this affect Chrome or Firefox on my Mac?
No. Each browser has its own JavaScript setting.
Summary
- Open Safari > Settings.
- Click Security.
- Uncheck Enable JavaScript.
- Recheck it when you need full websites again.

Kermit Matthews is a freelance writer based in Philadelphia, Pennsylvania with more than a decade of experience writing technology guides. He has a Bachelor’s and Master’s degree in Computer Science and has spent much of his professional career in IT management.
He specializes in writing content about iPhones, Android devices, Microsoft Office, and many other popular applications and devices.