How to block ads in Safari without installing anything?

Consider using a DNS based Ad Blocker if you don't want to install anything on the machine itself. For example, AdGuard provides free DNS servers that block ads. You can configure MacOS to connect to that DNS server, and benefit from ad blocking without installing anything.

AdGuard DNS: https://adguard.com/en/adguard-dns/overview.html


You can use the /etc/hosts file to block ad servers.

Pre-configured lists are available at https://github.com/StevenBlack/hosts and other sources.