An anti-capitalist ad-blocker that uses the hosts file
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Twann 8b0a91922a
changed security infos
4 days ago
.gitea updated pr template 4 months ago
assets added patch to package binary for ubuntu 4 months ago
debian fixed debian control 4 months ago
docs patched help page and improved examples 6 months ago
scripts updated gitlab CI 4 months ago
tblock fixed pipeline and tests 4 months ago
test added gitlab CI configuration 5 months ago
.bandit.yml multiple changes 4 months ago
.drone.yml updated .drone.yml 4 months ago
.gitignore updated .gitignore and 6 months ago
.gitlab-ci.yml updated .gitlab-ci.yml 4 months ago added 5 months ago release 1.3.2 4 months ago updated documentation 4 months ago moved AUTHORS to 2 months ago
LICENSE Added python code, Makefile and devscripts 8 months ago renamed CHANGELOG to 8 months ago
Makefile multiple changes 4 months ago removed badges in README 2 months ago changed security infos 4 days ago moved to repo root 6 months ago
requirements.txt security fixes 4 months ago
setup.cfg edited documentation and added devscripts to build source RPM package 7 months ago changed 'anticapitalist' to 'anti-capitalist' 5 months ago
tblock.spec modified Makefile 4 months ago

TBlock Logo



TBlock is a free and open-source ad-blocker, written in Python. It uses the hosts file to block advertising and tracking domains, which means it protects your whole system against these domains. TBlock is compatible with most of filter formats, and also has a built-in filter converter, to help you share your custom filters with people that are using different ad-blockers.


  • Free and open-source software
  • Easy to install
  • Does not cost any money
  • Does not track your personal data
  • Does not make you fingerprintable, unlike some ad-blocking browser extensions
  • Fast rules parsing
  • Blocks ads for your whole operating system
  • Compatible with most filter formats
  • Has an online filter repository to help you find and subscribe to filters in an easier way
  • Has a built-in filter converter


There are various methods to install TBlock. You need to install TBlock as root, since superuser privileges are required to edit the hosts file.

With python

This is the fastest and easiest way to install TBlock on your machine. Simply run the following command:

$ sudo pip install tblock

Other installation methods

More installation methods can be found on our website:


To build TBlock manually, see


After the installation and after each update of TBlock, you should update your local version of the remote filter repository and subscribe to a blocking filter, by running:

$ sudo tblock -Sy tblock-base


Blocking a domain with TBlock

To show the help page of TBlock, simply run:

$ tblock -h

To show the help page of the built-in converter, simply run:

$ tblockc -h

You can find more help about usage on TBlock's wiki.


If you found an issue or that you want to request a new feature, you have multiple options (because we don't want to force our users to join Codeberg to contribute to the project):


TBlock, its converter and its logo are released under GPLv3.

Libraries used

TBlock uses the external libraries:

Name Author License Homepage
colorama Jonathan Hartley BSD
requests Kenneth Reitz Apache 2.0
urllib3 Andrey Petrov MIT
defusedxml Christian Hiemes PSFL