Last Updated on October 13, 2026
An inexpensive ESP32-C3 development board is being used to build a compact, open source DNS ad blocker that can filter advertising and tracking domains across a network. The interesting part is not just the low hardware cost, but how the project stores a large domain blocklist without requiring external PSRAM.
Developed by M-Abozaid, the project named ESP32-C3 AdBlock takes an approach that is particularly interesting for embedded engineers, instead of loading thousands of domain names into RAM, it stores compact hashes in flash memory and searches them when DNS requests arrive.
The developer reports support for more than 140,000 domains in the standard configuration, with an expanded configuration accommodating approximately 537,000 domains. The firmware reportedly uses around 50 KB of RAM for the core design, making it an interesting example of memory efficient network filtering on a low cost microcontroller.
Project repository: https://github.com/M-Abozaid/esp32-c3-adblock
Project Video: https://www.youtube.com/shorts/RaxszOUMi8E?feature=share
How Does the ESP32-C3 Ad Blocker Work?
Before taking looking at the ad blocking hardware, let’s see the basic idea behind DNS-based ad blocking so that it helps to understand what is behind ad blocking. Consider you are using Mobile, Computer or Television and connecting it to online then it often asks a DNS resolver to translate a domain name into an IP address.
The ESP32-C3 AdBlock hardware checks each DNS request against its built-in blocklist. If the requested domain is listed then the device returns 0.0.0.0 instead of the actual IP address so preventing the device from reaching the ad server. If the domain is not blocked then the ESP32-C3 AdBlock hardware forwards the DNS request to an upstream DNS server and sends the returned IP address back to your device.
This means compatible devices can benefit from network level filtering without installing a separate browser extension on every device. However, clients must actually send their DNS requests through the ESP32-C3 for the filtering to work.
Hashes Instead of Domain Names
You know that large blocklist can consume considerable memory when every entry is stored as a string here for an example a domain such as ads.example.com requires multiple bytes so thousands of similar entries quickly add up when stored.
To solve this problem here the developer addresses this problem by converting domain names into 40-bit FNV-1a hashes. Each hash occupies just five bytes, and the resulting entries are stored in sorted order in flash memory.
When a DNS query arrives, the firmware calculates the corresponding hash and searches the stored table using binary search. It also checks parent-domain suffixes, allowing a blocked parent domain to cover its subdomains.
According to the project’s documentation, the standard list contains approximately 141,000 entries in around 0.67 MB of flash, while lookup times are reported at roughly 10 milliseconds, including the Wi-Fi round trip.
It is a small but interesting project that demonstrates what can be achieved with affordable hardware and thoughtful engineering. The project is worth a closer look for anyone working with embedded systems and open source electronics.

