An open-source project on GitHub turns a roughly $2 ESP32-C3 board into a network-wide DNS ad blocker that holds hundreds of thousands of blocked domains without any extra RAM chip. The esp32-c3-adblock repository, published under the MIT license, describes a Pi-hole-style sinkhole that stores 537,000 domains as hashes in flash and answers blocked lookups in about 10 milliseconds.

How the blocklist fits
DNS ad blockers such as Pi-hole work by answering requests for known ad and tracking domains with a dead-end address, so the ad never loads. Most ESP32 versions keep the blocklist as text in memory, which needs a board with PSRAM, an extra memory chip, at around $8. The project's README takes a different route. It stores each domain as a 40-bit FNV-1a hash, five bytes each, in sorted order in flash, and finds matches with a binary search.
The README's figures are 140,000-plus domains in about 0.7 MB of flash, roughly 50 KB of RAM in use, and a lookup that takes about 18 flash reads and around 10 ms including the Wi-Fi round trip. The README's comparison table lists about 2.5 MB of RAM for 141,000 domains using strings. A query for a blocked domain gets 0.0.0.0 back, and anything else is forwarded to an upstream resolver and the reply relayed.
Capacity and trade-offs
Forty bits is a collision trade-off. The README reports no collisions at 141,000 domains and about one at 537,000, meaning one unlucky domain gets blocked by mistake. Three capacity layouts are offered on a 4 MB board: about 141,000 domains, about 250,000 domains with dual app partitions for over-the-air firmware updates, and up to about 537,000 domains in a single-app layout. On an ESP32-S3 with 16 MB of flash, the author says the same method would hold roughly 2.7 million domains.
The README lists a C3 SuperMini with 4 MB of flash as the tested target and says the classic ESP32 DevKit builds too, as a community-contributed, compile-tested option. It warns that power must be stable, since loose USB adapters can brown out the radio during Wi-Fi transmit. A printable enclosure file for the SuperMini is included, with a note to keep the antenna end clear of plastic.
Dashboard and updates
Setup runs through a captive portal, so Wi-Fi credentials are not hard-coded. A web dashboard at c3adblock.local shows per-client blocked and allowed requests, lets a user block a specific device, and accepts custom domains. Firmware and blocklists can be updated over the air, and scheduled updates can pull prebuilt blocklist files from a set URL. State-changing endpoints require HTTP Basic authentication, and the project says it escapes custom domains against cross-site scripting and defends against cross-site request forgery.
A USB-A to USB-C adapter lets the board plug straight into a router's spare USB port for power.
Where it fits
The obvious comparisons are Pi-hole and AdGuard Home, which run on a Raspberry Pi or a server and offer far larger lists, more reporting, and richer filtering. This project trades those features for cost, size, and power draw. The project repository has drawn close to 3,000 stars on GitHub. Its difference from earlier ESP32 blockers is the hash-in-flash storage that drops the PSRAM requirement.
The usual limits of a DNS blocker apply. It stops ads served from separate domains, and it does not remove ads served from the same domain as the content. A tiny device that all household DNS depends on is also a single point of failure, so a fallback resolver on the router is worth planning.
The README's own arithmetic shows why the approach works. At five bytes per domain, 141,000 domains need about 0.7 MB, and the 4 MB flash on a typical ESP32-C3 has room for that with space left for the firmware and an update partition. Storing the same list as text would need several times more memory and push the design toward a board with PSRAM. The ESP32-C3 itself is a single-core 160 MHz RISC-V chip with Wi-Fi and Bluetooth LE, and the project avoids the radio brownouts that cheap USB power can cause by recommending a stable supply.
The author describes the project in a short video linked from the repository, and the README includes a build line for classic ESP32 boards using PlatformIO.
Sources and image credits
- GitHub: M-Abozaid/esp32-c3-adblock
- Images: GitHub repository social card and the project's video thumbnail
