A modern, lightning-fast Chrome/Chromium extension that completely eliminates audio ads, video interstitials, banners, and upgrade popups on Spotify Web Player.
Features β’ Installation Guide β’ How It Works β’ Creator β’ FAQ
Unlike generic ad blockers that break Spotify's web player or cause awkward pauses between songs, Spotify Ad Shield is built specifically for Spotify's internal playback engine:
- π Instant Mute & 16x Fast-Forward: Ad audio is muted before you hear a single second and accelerated to 16x speed to skip directly to your next track.
- β‘ Zero-Flicker Banner Stripping: High-priority CSS drops billboard ads, top-bar sponsors, and premium banners before the page paints.
- π Upgrade Dialog Auto-Dismissal: Automatically dismisses "Enjoy ad-free music" and "Pick up where you left off" upsell popups.
- π Dynamic Audio Visualizer: Features live audio equalizer and frequency wave graphs in a sleek Spotify dark-mode interface.
- ποΈ One-Click Master Toggle: Switch protection ON or OFF instantly from the popup.
Follow these simple steps to install and run Spotify Ad Shield in Google Chrome, Microsoft Edge, Brave, or any Chromium browser:
Clone the repository using Git:
git clone https://github.com/YASMANTH-VEMULA/spotify-ad-blocker.git(Or click the green Code button at the top of this GitHub page and select Download ZIP, then extract it to a folder).
Open your Chromium browser and paste the following URL into your address bar:
| Browser | Address Bar URL |
|---|---|
| Google Chrome | chrome://extensions |
| Microsoft Edge | edge://extensions |
| Brave Browser | brave://extensions |
In the top-right corner of the Extensions page, toggle the switch labeled "Developer mode" to ON.
Developer mode [ β ] (ON)
- Click the "Load unpacked" button in the top-left toolbar:
- In the folder picker dialog, select the cloned/extracted folder:
spotify-ad-blocker - Click Select Folder.
- Click the Extensions puzzle piece icon (π§©) in your browser's top toolbar.
- Find Spotify Ad Shield and click the Pin icon (π) to pin it for quick access.
- Navigate to open.spotify.com.
- Click the Spotify Ad Shield extension icon:
- Ensure the switch says ACTIVE PROTECTION.
- Play any song or playlist β all ads will be silenced and auto-skipped!
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Spotify Web Player β
βββββββββββββββββββββββββββββββββββββ¬βββββββββββββββββββββββββββββββββββββ€
β 1. Network Layer β 2. Media Player Hook β
β - declarativeNetRequest rules β - Hooks HTMLMediaElement in MAIN β
β - Blocks spclient ad endpoints β - 0s Latency Mute + 16x Speed β
β - Drops telemetry trackers β - Auto-triggers queue skip β
βββββββββββββββββββββββββββββββββββββΌβββββββββββββββββββββββββββββββββββββ€
β 3. DOM & UI Cleanup β 4. User Controls β
β - Injected CSS (zero layout lag) β - Glassmorphic popup UI β
β - Auto-dismiss modal observer β - Live Equalizer & Wave Graphs β
β - Strips upgrade buttons β - Real-time blocked stats counter β
βββββββββββββββββββββββββββββββββββββ΄βββββββββββββββββββββββββββββββββββββ
- Network Filtering (
rules.json): Uses Chromium's high-speeddeclarativeNetRequestengine to intercept ad-logic requests (spclient.wg.spotify.com/ad-logic/*,audio-ak-spotify-com.akamaized.net/ad/*, and ad networks) before network packets leave your computer. - Playback Automation (
content.js&page_hook.js): Hooks into Spotify'sHTMLMediaElementprototype. As soon as an ad track starts, volume is instantly zeroed (muted = true),playbackRateis boosted to16.0, and the track seeks to the end in under 0.2s. - Banner & Overlay Removal (
styles/adblock.css): Strips ad banners, sidebars, and upgrade promotions with zero layout shift.
spotify-ad-blocker/
βββ manifest.json # Manifest V3 extension definition & permissions
βββ rules.json # declarativeNetRequest network ad-blocking rules
βββ background.js # Service worker: manages badge state, rulesets & stats
βββ content.js # Isolated world script: DOM observer & promo killer
βββ page_hook.js # MAIN world script: hooks HTMLMediaElement playback
βββ generate_icons.js # Script generating multi-resolution PNG icons
βββ styles/
β βββ adblock.css # Zero-flicker CSS ad suppression styles
βββ popup/
β βββ popup.html # Glassmorphic Spotify dark-mode interface
β βββ popup.css # Styling, audio equalizer animations & Bento cards
β βββ popup.js # Master toggle controller & stats synchronizer
βββ icons/ # Multi-resolution extension icons (16, 32, 48, 128, SVG)
βββ assets/
βββ screenshot.png # Extension UI preview screenshot
Created by Yasmanth Vemula. Follow and support for more open-source tools:
- YouTube: @YASMANTHOps β Tech tutorials, devlogs & AI automation.
- Instagram: @yasmanth_vemula β Behind-the-scenes & daily updates.
No. Spotify Ad Shield operates 100% locally in your browser. It does not collect, store, or transmit your credentials, cookies, or listening history.
Yes. It is specifically optimized for free Spotify Web accounts to silence audio/video ads, remove banners, and skip upgrade popups.
Yes. Open the extension popup anytime and click the master toggle switch to pause protection.
This extension is an independent open-source project designed for educational and personal use. Spotify is a trademark of Spotify Technology S.A., registered in the U.S. and other countries. This project is not affiliated with, endorsed by, or associated with Spotify.
Enjoy uninterrupted, ad-free music! β Star this repository if it helped you!