explaingit

efforg/privacybadger

Analysis updated 2026-07-03

3,731JavaScriptAudience · generalComplexity · 1/5LicenseSetup · easy

TLDR

A browser extension from the Electronic Frontier Foundation that automatically learns to block hidden trackers that follow you across websites, without requiring you to manage any block lists yourself.

Mindmap

mindmap
  root((Privacy Badger))
    What it does
      Blocks cross-site trackers
      Sends privacy signals
      Cleans tracking links
    How It Learns
      Watches tracker patterns
      Auto-blocks repeat trackers
      No manual list needed
    Privacy Signals
      Global Privacy Control
      Do Not Track
    Widget Handling
      Replaces social embeds
      Click-to-activate
      Stops early tracking
    Audience
      Privacy-conscious users
      General public
      Developers
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Install the extension to automatically block advertising and analytics trackers that follow you from site to site without touching any settings.

USE CASE 2

Contribute a bug fix or new feature to the extension codebase by joining the EFF's weekly public developer meetings.

USE CASE 3

Use the source code as a reference to understand how browser extensions detect and block cross-site tracking patterns.

USE CASE 4

Pair it with your existing ad blocker to also strip Facebook and Google tracking parameters from links you click.

What is it built with?

JavaScriptBrowser Extension APIChromeFirefox

How does it compare?

efforg/privacybadgeraquasecurity/cloudsploitforwardemail/email-templates
Stars3,7313,7313,733
LanguageJavaScriptJavaScriptJavaScript
Setup difficultyeasymoderatemoderate
Complexity1/53/52/5
Audiencegeneralops devopsdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min
Licensed under GPLv3, you can use, modify, and share this software freely as long as any modified version you distribute also stays open-source under the same license.

In plain English

Privacy Badger is a browser extension made by the Electronic Frontier Foundation, a nonprofit focused on digital rights. It is designed to stop websites from tracking your behavior across the web without your knowledge. When you visit websites, many pages load hidden tracking scripts from third-party companies that follow you from site to site, building a profile of your browsing habits. Privacy Badger watches for this kind of cross-site tracking and, once it has seen the same tracker following you across several different sites, it automatically blocks that tracker. The blocking happens on its own without you needing to manage a list of blocked services. Privacy Badger also sends two privacy signals to websites: the Global Privacy Control signal, which tells companies to opt you out of data sharing and selling, and the Do Not Track signal, which asks companies not to track you at all. If a company receives those signals and continues tracking you anyway, Privacy Badger adds that tracker to its block list. Beyond tracker blocking, the extension replaces certain embedded widgets, like video players and comment sections that would normally load tracking code, with a click-to-activate placeholder. You can still use the widget by clicking on it, but tracking does not start until you choose to. It also cleans tracking data that Facebook and Google add to links when you click them. The extension is available for Chrome and Firefox through the Privacy Badger homepage. The source code is open and licensed under GPLv3. Development is maintained by the EFF, with public contributor meetings held weekly for anyone who wants to participate.

Copy-paste prompts

Prompt 1
I want to understand how Privacy Badger detects cross-site tracking. Walk me through the logic of how it decides when a third-party domain is a tracker based on how many sites it appears on.
Prompt 2
I'm building a browser extension and want to implement a heuristic tracker-detection system similar to Privacy Badger. Show me a JavaScript outline of how to observe third-party requests and count how many distinct first-party sites each domain appears on.
Prompt 3
Privacy Badger replaces social media widgets with click-to-activate placeholders. Write the JavaScript logic to detect an embedded YouTube iframe, replace it with a placeholder div, and restore the original iframe when the user clicks.
Prompt 4
I want to add Global Privacy Control support to my website. Show me how to read the GPC header in a Node.js/Express server and what to do when a user has opted out.

Frequently asked questions

What is privacybadger?

A browser extension from the Electronic Frontier Foundation that automatically learns to block hidden trackers that follow you across websites, without requiring you to manage any block lists yourself.

What language is privacybadger written in?

Mainly JavaScript. The stack also includes JavaScript, Browser Extension API, Chrome.

What license does privacybadger use?

Licensed under GPLv3, you can use, modify, and share this software freely as long as any modified version you distribute also stays open-source under the same license.

How hard is privacybadger to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is privacybadger for?

Mainly general.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub efforg on gitmyhub

Verify against the repo before relying on details.