Filter syntax extensions

Alexander Pushkov edited this page Nov 10, 2017 · 21 revisions

This version of uBlock is no longer under development.

Consider using uBlock Origin or another adblocker.

uBlock Origin:

Other adblockers and privacy tools:

Please note that donations sought on are not benefiting uBlock Origin developers.

uBlock supports most of the Adblock Edge / Adblock Plus filter syntax. However uBlock does not support some very specific cases, and also has its own extensions added to the ABE/ABP filter syntax.

Not supported


Not supported. The purpose of the document option is to disable uBlock completely. The reason it is not supported is to be sure that users explicitly disable uBlock themselves if they wish (through whitelisting), and not have some external filter list decide for them.

Extended syntax

uBlock extends Adblock Edge / Adblock Plus filter syntax.

Network filters


The filter option important means to ignore all exception filters (those prefixed with @@).

It applies only to net block filters. The important option will allow you to block with 100% certainty specific net requests.

Example 1: ||^$important,third-party will block all net requests to, disregarding any existing network exception filters.

Example 2: ||^$important,third-party


To specifically disable inline script tags in a main page: ||^$inline-script.

Cosmetic filters

Entity-based cosmetic filters: Filters which are to be applied to a specific entity.

An entity is defined as follows: a formal domain name with the Public Suffix part replaced by a wildcard.

Example 1: google.* will apply to all similar Google domain names:,,,, etc.

Example 2: facebook.* will apply to all similar Facebook domain names:,

Since the base domain name is used to derive the "entity", would not match google.*.

Clone this wiki locally
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.