A free browser extension that blocks adult (18+) websites, images, videos and removes ads.
Created by Rongon Kairy
PureGuard keeps your browsing clean and safe. It blocks adult websites from opening, hides adult images and videos on normal pages, turns on SafeSearch in major search engines, and removes ads and pop-ups β all completely free, no account needed, works fully offline inside your browser.
You stay in control. One big shield button switches all protection on or off, and two switches control the adult filter and the ad blocker separately.
| # | Section |
|---|---|
| 1 | Features |
| 2 | Install |
| 3 | How to Use |
| 4 | How It Works |
| 5 | Project Structure |
| 6 | Permissions |
| 7 | Privacy |
| 8 | Limitations |
| 9 | Troubleshooting |
| 10 | FAQ |
| 11 | Build from Source |
| 12 | Updating Block Lists |
| 13 | Roadmap |
| 14 | Credits |
| 15 | Contributing |
| 16 | License |
| Feature | What it does |
|---|---|
| π« Adult website blocking | About 118,000 adult domains blocked. Shows a "This page was blocked" page instead. |
| π Address keyword blocking | Blocks URLs containing words like porn, xxx, hentai, xvideo, xnxx. |
| πΌοΈ Embedded content blocking | Images, videos, scripts and frames from adult domains are blocked even on normal websites. |
| ποΈ Image and video hiding | Images/videos whose filename, alt text, title or surrounding text look adult are hidden. |
| π·οΈ Page label detection | Pages with RTA label or rating: adult/mature are blocked automatically. |
| π Title & description check | Pages whose title, description or keywords contain adult terms are blocked. |
| π SafeSearch | Turns on SafeSearch for Google (safe=active), Bing (adlt=strict) and DuckDuckGo (kp=1). |
| Feature | What it does |
|---|---|
| π‘ Ad network blocking | About 96,000 ad, tracker and pop-up domains blocked. |
| π― Banner hiding | Google AdSense, Taboola, Outbrain and "advertisement" containers hidden. |
- π One-click on/off shield button β toolbar icon shows
OFFbadge when off - βοΈ Separate switches for Adult content and Ads
- π Live status line showing items hidden on current page
- π’ Counter of all images and videos hidden so far
β οΈ Clear error message if block lists fail to load- βΏ Keyboard-friendly and reduced-motion support
Download the ZIP for your browser from the Releases page.
| Browser | ZIP File |
|---|---|
| Chrome, Edge, Brave, Safari | pureguard-chrome-edge-brave-safari.zip |
| Firefox | pureguard-firefox.zip |
- Unzip the file into a folder
- Open the extensions page:
- Chrome β
chrome://extensions - Edge β
edge://extensions - Brave β
brave://extensions
- Chrome β
- Turn on Developer mode
- Click Load unpacked β select the unzipped folder (the one containing
manifest.json) - Refresh every tab that is already open
π‘ To update: Replace old folder files with new version β click reload icon on PureGuard card β refresh tabs.
- Unzip the Firefox file
- Open
about:debugging#/runtime/this-firefox - Click Load Temporary Add-on β select
manifest.json - Open
about:addonsβ PureGuard β Permissions β allow Access your data for all websites
β οΈ Firefox removes temporary add-ons when the browser closes. For a permanent install, the add-on must be signed on addons.mozilla.org.
- Install Xcode
- In Terminal, run:
xcrun safari-web-extension-converter /path/to/pureguard
- Build and run the generated project in Xcode
- Enable PureGuard in Safari β Settings β Extensions
- Click the PureGuard icon in the toolbar (pin it from the puzzle-piece menu)
- Press the big shield button to turn all protection on or off
- Use Adult content and Ads switches to control each part separately
- Read the This page line:
This page: 3 hidden, 12 blockedβ PureGuard is working βNot active on this page yetβ Reload the tabOpen a website to see activityβ Appears on browser pages (new tab, etc.)
Changes take effect immediately β no restart needed.
PureGuard has four parts that work together:
The browser's declarativeNetRequest system stops blocked requests before they load.
| Rule Set | File | Contents |
|---|---|---|
adult |
rules/adult.json |
~118,000 adult domains + keyword URL blocking |
ads |
rules/ads.json |
~96,000 ad, tracker and pop-up domains |
safesearch |
rules/safesearch.json |
SafeSearch parameters for Google, Bing, DuckDuckGo |
Runs on every page, at start of loading, in every frame.
- Checks
<img>,<video>,<picture>and<iframe>sources - Climbs up 7 DOM levels to find and hide entire adult content cards
- Re-checks on infinite scroll, lazy loading, and after 1.5, 4 and 9 seconds
- Hidden elements get
visibility: hidden+data-pg-hiddenmarker
- Reads/writes settings
- Shows current tab status
- Shows blocked request count (Chrome-based)
- Shows errors if block lists fail
Simple redirect page with Go back button shown when a site is blocked.
pureguard/
βββ manifest.json # Chrome / Edge / Brave / Safari
βββ manifest.firefox.json # Firefox manifest
βββ background.js # Switches rule sets on/off
βββ content.js # Hides adult images/videos, blocks pages
βββ popup.html # Popup layout
βββ popup.css # Popup design
βββ popup.js # Popup logic and status
βββ blocked.html # Blocked website redirect page
βββ blocked.css
βββ blocked.js
βββ assets/
β βββ logo.png # PureGuard logo
βββ icons/
β βββ icon16.png
β βββ icon48.png
β βββ icon128.png
βββ rules/
β βββ adult.json # Adult domain rules
β βββ ads.json # Ad / pop-up domain rules
β βββ safesearch.json # SafeSearch rules
βββ tools/
βββ build_rules.py # Regenerates rule files from public lists
| Permission | Why it is needed |
|---|---|
storage |
Saves settings and counter on your device |
declarativeNetRequest |
Blocks adult and ad requests |
declarativeNetRequestFeedback |
Shows blocked request count in popup (Chrome only) |
<all_urls> |
Lets content script hide adult images/ads on any website |
β PureGuard does not request access to your history, bookmarks, downloads or cookies.
PureGuard does not collect, store or send any personal data or browsing history.
- β No server
- β No analytics
- β No tracking
- β No account required
- β All checks happen inside your browser
- β Only your settings and a counter are saved in local browser storage
- Does not look at image pixels β blocking is text-based (filenames, alt text, labels). An adult image with no adult words nearby may still appear.
- Block lists are not perfect β new adult/ad domains not yet on the lists won't be blocked until updated.
- False positives can happen β a normal page with words like "adult" or "sexy" near an image may be hidden.
- Not a parental-control system β anyone with browser access can switch it off. Use with OS or router parental controls for children.
- Firefox needs all-websites permission granted manually, and temporary add-ons disappear on restart.
- Private/incognito windows only work if you allow the extension in those windows.
| Problem | Fix |
|---|---|
| Nothing is blocked | Refresh the tab. Check shield button says "Protection is on". |
| Popup says "Not active on this page yet" | Reload the tab |
| New version not showing after update | Click reload icon on extension card β refresh tabs |
| "Block lists failed to load" | Reload the extension. If it stays, open Errors on extensions page and report it. |
| Firefox: nothing happens | Allow Access your data for all websites in about:addons β PureGuard β Permissions |
| A normal website is blocked | Turn Adult content switch off β report the site in an Issue |
| A site looks broken | Turn Ads switch off β report the site |
| "Load unpacked" shows manifest error | Select the folder directly containing manifest.json, not a parent folder |
| Works in normal window, not incognito | Enable Allow in Incognito in extension details |
Is it really free?
Yes. No paid plans, accounts or ads. Free forever.
Does it slow down my browser?
Rules are handled by the browser natively and are very fast.
Does it work on my phone?
Chrome for Android does not support extensions. Firefox for Android supports a limited set. PureGuard has not been tested on phones yet.
Can I add my own sites to block?
Not from the popup yet. You can add domains to
EXTRA_ADULTorEXTRA_ADSintools/build_rules.pyand rebuild.
Can I allow one website?
Not yet β allow list is on the roadmap.
Why is an image still visible?
PureGuard reads text, not pixels. See Limitations.
Does it block ads on YouTube?
Not reliably. YouTube serves ads from its own domains.
# Step 1 β Clone the repository
git clone https://github.com/RongonKairy/pureguard.git
cd pureguard
# Step 2 β Load as unpacked extension (see Install section)
# Firefox build:
# Copy folder β replace manifest.json with manifest.firefox.json β zip it
# Chrome build:
# Zip the folder without manifest.firefox.jsonThe rules/ files are generated by tools/build_rules.py.
- Download the newest lists into a
lists/folder:
| File | Source |
|---|---|
nsfw.txt |
Hagezi wildcard/nsfw-onlydomains.txt |
porn.txt |
StevenBlack alternates/porn-only/hosts |
light.txt |
Hagezi wildcard/light-onlydomains.txt |
popupads.txt |
Hagezi wildcard/popupads-onlydomains.txt |
- Run the script:
python3 tools/build_rules.py lists rules- Reload the extension
- β Allow list ("never block this website") in popup
- π Custom block list in popup
- π Optional PIN/password to prevent others switching off
- π€ On-device image recognition for adult images with no text clues
- π Bangla and multi-language interface
- πͺ Published on Chrome Web Store, Edge Add-ons and Firefox Add-ons
Block lists used to generate the rules:
- Hagezi DNS Blocklists β NSFW, Light and Pop-up Ads lists
- StevenBlack/hosts β porn-only list
Bug reports and ideas are welcome!
- Report a problem: Open an Issue with the website address, browser name/version, PureGuard version, and what you expected.
- Submit a change: Fork β make change β test as unpacked extension β open a Pull Request.
This project is licensed under the MIT License β free to use, share, and modify.
MIT License
Copyright (c) 2026 RongonKairy
PureGuard β Browse Clean. Stay Safe. Forever Free.
Β© 2026 Created by Rongon Kairy
β If you find PureGuard useful, please give it a star on GitHub!