explaingit

gorhill/umatrix

4,682JavaScriptAudience · developerComplexity · 2/5LicenseSetup · moderate

TLDR

uMatrix is a browser extension for Firefox and Chrome that lets you block or allow any network request a website makes by source and content type using a point-and-click grid interface.

Mindmap

mindmap
  root((uMatrix))
    What it does
      Block network requests
      Grid-based control
      Request logging
      Per-site rules
    Content types
      Scripts
      Cookies
      Images
      Media
    Browsers
      Firefox
      Chrome
      Opera
    Audience
      Privacy users
      Advanced users
    Status
      GPLv3
      No active development
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

Things people build with this

USE CASE 1

Block all third-party scripts and trackers by default and selectively allow only what each site needs to function.

USE CASE 2

Use the built-in request logger to diagnose why a website is broken and identify exactly which blocked request caused it.

USE CASE 3

Audit what every website you visit is loading by running in strict block-all mode and reviewing the request log.

Tech stack

JavaScriptWebExtensions API

Getting it running

Difficulty · moderate Time to first run · 30min

Block-all default mode will break most websites until you configure per-site rules, expect a learning curve before it is usable.

GPLv3, free to use, modify, and distribute, but any version you ship to others must also be released as open source under the same license.

In plain English

uMatrix is a browser extension for Firefox, Chrome, and Opera that gives you fine-grained control over what network requests your browser is allowed to make while visiting a website. Most websites pull in content from many different sources, including scripts, images, cookies, and data from third-party services. uMatrix lets you decide, for each source and each type of content, whether to allow or block it. The extension uses a grid-based interface. Rows represent the sources that a page is trying to contact, and columns represent the types of content being requested, such as scripts, cookies, or media. You click cells in this grid to allow or block combinations. By default it operates in block-all mode, which means almost everything is blocked until you explicitly allow it. This approach stops most tracking, ads, and unwanted scripts automatically, but it also means many websites will not work correctly until you configure them. The README is direct about this: uMatrix is intended for advanced users who are comfortable figuring out why a site broke and unblocking the specific pieces it needs. There is a built-in logger that shows every request the browser made and what uMatrix did with it, which is the main tool for diagnosing broken pages. You can also switch it to allow-all mode if you prefer a less disruptive experience, though that reduces the privacy and security benefits significantly. The project is forked from an earlier extension called HTTP Switchboard and shares most of its documentation with that predecessor. Translation contributions are managed through Crowdin. The license is GPLv3. The README notes that the project is no longer actively receiving new feature development and that user support happens on a Reddit community.

Copy-paste prompts

Prompt 1
I use uMatrix in block-all mode and a site is broken. Show me how to read the request logger and decide what to unblock without enabling everything.
Prompt 2
Export my uMatrix rules as a backup file and generate a base ruleset that allows Google Fonts and Cloudflare CDN globally but blocks everything else.
Prompt 3
Write a uMatrix rule file that permits first-party content everywhere but blocks all third-party cookies, scripts, and frames by default.
Prompt 4
Explain the difference between uMatrix block-all and allow-all modes and when I should switch between them for a given site.
Open on GitHub → Explain another repo

← gorhill on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.