How to Disable JavaScript on Apple Safari (iPad, iPhone, iOS, macOS)

Safari's JavaScript controls live in two different places. On Mac, the toggle is inside Safari's own Settings (the Security tab on macOS Sonoma 14 and Sequoia 15+). On iPhone and iPad, JavaScript is controlled by iOS itself - the switch is in the system Settings app, not inside Safari. iOS 17 moved Safari under a new Apps section, and iOS/iPadOS 18+ keeps it there, so the path in 2026 is Settings - Apps - Safari - Advanced, not the older Settings - Safari you may remember.

This guide covers every common reason someone turns JavaScript off in Safari today: privacy and anti-fingerprinting, battery and mobile data savings, web development testing, accessibility (VoiceOver often handles static HTML more cleanly), and reducing exposure to malicious scripts. All instructions reflect Apple's current interface on macOS Sequoia (15+), macOS Sonoma (14), and iOS/iPadOS 18+.

Disable JavaScript on iPhone and iPad (iOS/iPadOS 18+)

This is the most-used Safari path because the iPhone and iPad together drive the majority of Safari traffic. The toggle is system-wide and applies to every tab, every site, and every in-app browser view that uses WebKit. Follow the six steps below.

Step 1: Open the Settings app

Tap the gray gear icon labeled Settings on your Home Screen or in the App Library.

iOS Settings home screen showing the top of the settings list with Apple Account, Wi-Fi, Bluetooth and other system options.
The iOS Settings app on iOS/iPadOS 18+ - your starting point for every Safari preference, including JavaScript.

Step 2: Scroll down and tap Apps

iOS 17 introduced a dedicated Apps section that consolidates per-app settings. iOS/iPadOS 18+ keeps it; Safari now lives inside it instead of at the top level.

iOS Settings showing the Apps row highlighted, with system sections like General, Display, and Privacy above it.
Tap Apps. On iOS 16 and earlier, Safari sat directly under Settings - the Apps subdivision is the modern path.

Step 3: Tap Safari

The Apps screen lists every installed app with per-app preferences. Scroll until you find Safari and tap its row.

iOS Apps list with Safari highlighted, showing other Apple apps like Calendar, Camera, and Contacts.
Open Safari's per-app settings. This is where every Safari-specific control lives on iOS.

Step 4: Open Advanced

Scroll all the way to the bottom of Safari's settings. The very last row is Advanced. Tap it.

Safari settings panel scrolled to the bottom, with the Advanced row highlighted at the end of the list.
The Advanced submenu hides JavaScript, Web Inspector, Experimental Features, and other developer-leaning toggles.

Step 5: Locate the JavaScript toggle

The Advanced screen shows a single JavaScript switch. When the switch is green, JavaScript is enabled in every Safari tab and every in-app web view.

Safari Advanced screen on iOS with the JavaScript switch in the on (green) position.
JavaScript currently on - the default for every fresh iPhone and iPad.

Step 6: Toggle JavaScript off

Tap the switch once. It turns from green to gray, confirming JavaScript is now disabled across Safari.

Safari Advanced screen on iOS with the JavaScript switch in the off (gray) position.
JavaScript off. To finish the change, quit Safari from the App Switcher and reopen it so already-loaded tabs reflect the new setting.

That single toggle disables JavaScript across every site you visit in Safari. It also affects in-app Safari views, the browser surface that opens when you tap a link inside Mail, Messages, Slack, X, Reddit, and most other apps - iOS routes those through the same WebKit engine and respects the system JavaScript setting. There is no separate toggle for in-app browsing.

Disable JavaScript on macOS (Sonoma 14 and Sequoia 15+)

On the Mac, JavaScript is a Safari-only setting (not a system setting), so the toggle lives inside Safari's own Settings window. Four steps total.

Step 1: Open Safari

Launch Safari from the Dock, Launchpad, or Applications folder. Make sure Safari is the foreground app - the menu bar at the very top of the screen should read Safari next to the Apple logo.

Safari window open on macOS Sequoia, showing the address bar and a fresh start page.
Safari running on macOS Sequoia 26. The menu bar's Safari item is what you click next.

Step 2: Open the Safari menu and click Settings

From the macOS menu bar, click Safari and choose Settings... (or press Cmd+,). On macOS Ventura 13 and later Apple renamed this menu item from Preferences to Settings, so older guides referring to "Safari Preferences" still describe the same window.

macOS menu bar with the Safari menu open and the Settings... item highlighted near the top of the dropdown.
Safari menu open with Settings... selected. The Cmd+, shortcut works from anywhere in Safari.

Step 3: Click the Security tab and find Enable JavaScript

The Settings window opens with a row of tabs across the top. Click Security. The tab contains a small group of checkboxes - Enable JavaScript is one of them, normally checked.

Safari Settings window with the Security tab selected and the Enable JavaScript checkbox checked.
Security tab with Enable JavaScript currently checked - the factory default.

Step 4: Uncheck Enable JavaScript

Click the checkbox once to clear it. Safari applies the change instantly - there is no confirmation dialog and no "save" button. Close the Settings window and reload any open tabs.

Safari Settings window Security tab with the Enable JavaScript checkbox now unchecked.
Enable JavaScript unchecked. Verification: the very next page load runs with JavaScript off across every site.

Safari on macOS does not show a confirmation dialog - the change applies immediately the next time a page loads. If a site that was working a moment ago suddenly looks broken, empty, or stuck on a loading spinner, JavaScript is now off and the site requires it. Some macOS versions older than Big Sur 11 placed JavaScript under a separate Advanced tab; on Sonoma and Sequoia in 2026, only the Security tab is correct.

Verify JavaScript is actually disabled

The fastest check is to visit a site you know depends heavily on JavaScript - a webmail inbox, a banking dashboard, a maps site, a video player. If the page shows a static fallback, a "please enable JavaScript" notice, or simply fails to render anything past the header, you have confirmed the toggle is off. You can also visit our home page at enablejavascript.io, which explicitly tells you whether JavaScript is currently running on the device you are using right now. Another option: open the URL bar and type javascript:document.title - on a JS-enabled browser this would show the page title, on a JS-disabled one nothing happens.

If you are on iPhone or iPad and want to double-check that the switch is in the off position, the verified state looks like this:

iOS Safari Advanced screen with the JavaScript switch shown in the off (gray) position as visual verification.
iOS verified state - the JavaScript switch is gray.

And on macOS Sequoia, the verified state inside Safari's Security settings looks like this:

macOS Safari Settings Security tab with Enable JavaScript unchecked, shown as a verification reference.
macOS verified state - the Enable JavaScript checkbox is empty.

Why people disable JavaScript in Safari

Disabling JavaScript is not just for paranoid power users. Five legitimate audiences regularly turn it off:

  • Privacy and anti-fingerprinting. Most tracking and fingerprinting techniques rely on JavaScript reading screen size, installed fonts, canvas rendering, WebGL device details, audio context behavior, and dozens of other passive signals. Disabling JavaScript prevents nearly all of those identifiers from being collected. Safari's built-in Intelligent Tracking Prevention and Private Relay help against cross-site cookies and IP-based tracking, but turning JavaScript off is the single strongest privacy setting Safari exposes.
  • Battery and mobile data savings. Heavy ad scripts, autoplay video players, social embeds, and analytics beacons run constantly on JavaScript-enabled sites. On an iPhone or iPad on a metered cellular plan or international roaming, disabling JavaScript can noticeably extend battery life across a long browsing session and cut data consumption per page from megabytes to kilobytes.
  • Web development and QA testing. Front-end developers regularly turn JavaScript off to verify that a site degrades gracefully: that critical content is server-rendered, that primary navigation works, that forms still submit, and that the experience holds up for users on flaky cellular connections, locked-down corporate networks, or strict privacy extensions that block scripts by default.
  • Reducing malware exposure. The vast majority of browser-delivered malware, drive-by cryptominers, credential phishers, and exploit kits rely on JavaScript to execute. Disabling JavaScript shrinks the attack surface significantly. It is not a complete defense, but it eliminates an entire class of common attacks.
  • Accessibility. VoiceOver, Switch Control, and other assistive technologies sometimes work more predictably on static HTML than on heavily scripted single-page applications, where focus management is uneven and screen-reader updates can be missed when content swaps in dynamically.

Per-site disabling: use Content Blockers

Safari does not include a built-in per-site JavaScript permission list, unlike Chrome or Firefox. The toggle described above is global: either every site can run JavaScript or none can. If you only want to disable JavaScript on specific sites - say, news sites known for heavy ad scripts - install a Content Blocker extension from the App Store. Content Blockers are sandboxed Safari extensions that can block scripts, trackers, and ads using declarative rule lists. Popular options in 2026 include Wipr, AdGuard for Safari, 1Blocker, Hush, and StopTheMadness. Once installed, enable the extension under Settings - Apps - Safari - Extensions on iOS or Safari - Settings - Extensions on macOS, then configure its filter lists.

For developers who need finer control, consider switching to a different browser on the desktop. Firefox exposes a per-site permission for JavaScript directly in the address bar's site-info panel, and Chrome lets you build a per-domain allow-list under chrome://settings/content/javascript. Safari's intentionally minimal design does not expose this.

Heads-up: many sites will not work without JavaScript

Webmail, online banking, video streaming, social networks, online shopping checkouts, document editors, ride-share booking flows, and most modern dashboards require JavaScript to function. With JavaScript disabled in Safari, expect a much narrower web. Readable articles, static documentation, well-built news sites, government pages, and reference material like Wikipedia still work fine. Anything interactive will typically refuse to load past a notice or render empty containers where dynamic content should appear. If a site you genuinely need stops working, re-enable JavaScript using the same path in reverse, finish your task, and disable it again afterward.

Troubleshooting

  • The toggle won't move. On a managed device (a corporate or school iPhone, or a Mac under MDM), an administrator may have locked the setting. Check Settings - General - VPN & Device Management on iOS, or System Settings - Privacy & Security - Profiles on macOS. If a configuration profile is enforcing JavaScript, you cannot override it as a user.
  • The change doesn't take effect. Safari caches pages aggressively. Quit Safari fully (App Switcher on iOS, Cmd+Q on Mac) and reopen, or open a new private tab to test.
  • I disabled JavaScript but tracking still seems active. Some tracking happens on the server side from your IP address and request headers - JavaScript is not the only vector. Combine the toggle with iCloud Private Relay or a trusted VPN for stronger network-level privacy.

Re-enable JavaScript later

To turn JavaScript back on, follow the same path and flip the switch the other way. On iPhone or iPad: Settings - Apps - Safari - Advanced - JavaScript on (green). On Mac: Safari - Settings - Security, then re-check the Enable JavaScript box. The toggle takes effect on the next page load, so reload any open tabs. There is no built-in keyboard shortcut to flip JavaScript on or off in Safari, so users who switch frequently for testing or privacy often keep a Content Blocker installed for selective blocking, or use a separate browser like Firefox where the JavaScript flag lives in about:config and can even be toggled per-profile.

Javascript is enabled in your web browser. If you disable JavaScript, this text will change.

F.A.Q

Why would I disable JavaScript on my iPhone or iPad?

Three common reasons. Privacy: most fingerprinting and tracking scripts run on JavaScript, so turning it off blocks a large share of passive data collection beyond what Safari's Intelligent Tracking Prevention already does. Battery and data: ad scripts, autoplay video players, and analytics beacons constantly run JavaScript in the background; disabling it noticeably extends battery life and lowers cellular data use. Testing: developers turn JavaScript off to verify a site still works without it. Note that iOS 17 moved the toggle to Settings - Apps - Safari - Advanced; if you remember it under Settings - Safari, that older path no longer applies on iOS/iPadOS 18+ in 2026.

Will every website break if I turn JavaScript off in Safari?

No, but a lot of modern ones will. Webmail, online banking, social networks, streaming services, online shopping checkouts, and most dashboards need JavaScript to work. Static news articles, blogs, documentation sites, and well-built government or reference pages typically still render fine. If a site you need refuses to load, you have two options: re-enable JavaScript globally, or install a Safari Content Blocker that lets you keep JavaScript on overall but block trackers and scripts on a per-domain basis. Safari itself does not include a native per-site JavaScript permission list - the built-in toggle is all-or-nothing.

How do I quickly re-enable JavaScript in Safari if I need to?

Same path you used to disable it, just flip the toggle back. On iPhone or iPad: open Settings - Apps - Safari - Advanced - JavaScript and turn the switch on (green). On Mac: open Safari, choose Safari - Settings (Cmd+,), click the Security tab, and re-check the Enable JavaScript box. Reload any tabs that were already open. There is no built-in keyboard shortcut to toggle JavaScript on or off in Safari, so if you switch frequently for testing or privacy you may want to either keep a third-party Content Blocker installed for selective blocking, or use a separate browser like Firefox where the JavaScript flag lives in about:config and can be toggled per-profile.