About this project
wBlock is a free, open-source content blocker for Safari on macOS, iOS, iPadOS and visionOS. It is distributed as a single app across all four platforms, available on the App Store, via Homebrew cask, or as a DMG from GitHub releases.
Safari limits each content blocker to 150,000 rules and does not let blockers modify a page's JavaScript. wBlock works around this by shipping five content blockers (Ads, Privacy, Security, Foreign, Custom) for a total of 750,000 rules, plus a separate scripts extension for anything a static rule cannot express.
Blocking
Filter lists are written in AdGuard syntax and converted with SafariConverterLib, then split across the five blockers. Safari performs the matching itself, so no wBlock code runs during page load. The app reports idling around 40 MB. Defaults include regional lists selected from the user's language, annoyance and cookie-banner lists, and support for adding lists by URL, paste or file. Updates run on a user-chosen schedule from hourly to weekly; lists that publish diff patches download only the changes, and on macOS a launch agent can keep checking while the app is closed. Tracking parameters such as utm_* are stripped from links and link shorteners are unwrapped by default. A capacity bar and rules viewer show which lines were unsupported, duplicated, or handed to the scripts extension.
Userscripts and userstyles
The scripts extension includes a Greasemonkey-compatible engine supporting both GM_* and GM.* APIs. GM_xmlhttpRequest is restricted to hosts a script declares in @connect; only HTTP and HTTPS are allowed, redirects are checked before being followed, and requests do not carry browser cookies or saved logins. UserCSS themes (.user.css) are supported, including Less, Sass and Stylus. A built-in catalog offers Tube Cleaner, Player Cleaner, DeArrow, Dark Reader, Return YouTube Dislike, Bypass Paywalls Clean, AdGuard Extra, AdGuard Popup Blocker and TwitchAdSolutions; all ship disabled except tinyShield, an anti-adblock defuser.
Native video
Tube Cleaner and Player Cleaner hand a site's video back to Safari before the page paints, enabling Picture-in-Picture, background audio, fullscreen and Now Playing. Tube Cleaner targets YouTube, keeps YouTube's own stream, exposes chapters and captions in Safari's native menus, and skips sponsors via SponsorBlock with per-category settings. Player Cleaner covers video.js, JW Player, Plyr, Flowplayer, MediaElement, Clappr, Media Chrome and shadow-root players such as Archive.org's, and remembers speed, volume, captions and playback position per site. Both update independently from the wBlock-userscripts repository. They do not block ads themselves; the filter lists do.
Per-site control and sync
A toolbar popup provides separate switches for filtering, userscripts and autoplay, plus the element zapper. Filter lists and userscripts can be limited to or excluded from specific sites, and zapper rules remain editable in Settings. iCloud syncs lists, custom filters, userscripts, allowlist and settings across devices; a local backup export is available as an alternative.
Architecture
Filter data is stored in Protocol Buffers with LZ4 compression and streamed to disk to limit memory use during large compiles. Changing one list rebuilds only the blockers it feeds, though Safari still requires a reload before changes take effect.
Support and licensing
The project is licensed GPL-3.0, funded through Open Collective, and states that it collects no data. Issues are tracked on GitHub and community discussion happens on Discord. Rule conversion and scriptlets come from AdGuard; SponsorBlock and DeArrow data come from Ajay Ramachandran's projects under CC BY-NC-SA 4.0.
Comments
0 people shared their preference · Deer Point appears after 10 participants
Sign in to join the discussion.