Hosts File Managers for Mac Compared

Your Mac's /etc/hosts file decides where a domain points before DNS is asked. Point an ad or tracker domain at 0.0.0.0 and every app on the Mac stops reaching it. Here's how the main ways to manage that file compare in 2026. Competitor facts come from each project's own page and were checked on 17 Oct 2026.

Short answer

Side by side

SaneHostsSwitchHostsGas MaskTerminal + nano
Price$14.99 once (14-day trial, no card)FreeFreeFree
Latest release1.1.265.0.2 (3 Sep 2026)0.8.6 (29 Feb 2020)n/a
Apple siliconNative (macOS 14+)Apple silicon and universal buildsIntel-only binary, runs under Rosetta 2n/a
Built forBlocking ads, trackers, adult, gambling, socialSwitching hosts setupsManaging and switching hosts filesAnything, by hand
Curated blocklists200+, five one-click levelsRemote hosts by URLRemote hosts by URLYou find them
DNS flush after changesAutomaticPost-apply command option—Manual
Backups / undoAutomatic backups, roll backTrash and restore entries—None
Source codePublic on GitHub (PolyForm Shield)Open source (Apache-2.0)Public on GitHubn/a
PlatformsMacMac, Windows, LinuxMacAny

“—” means the project doesn't state it. Sources, checked 17 Oct 2026: SwitchHosts on GitHub and switchhosts.app; Gas Mask 0.8.6 release (architecture read from the downloaded app); StevenBlack/hosts. Something out of date? Email [email protected].

Which one fits you

SwitchHosts
Free · Apache-2.0

A well-maintained, cross-platform hosts switcher with syntax highlighting, tray switching, remote hosts that refresh on a schedule, and import/export. It's the right pick for developers who flip between local, staging and production hosts. It doesn't ship curated ad-blocking levels.

Gas Mask
Free · last release 2020

The classic Mac hosts editor many of us started with. Version 0.8.6 is still downloadable, but it's an Intel build, so Apple silicon Macs run it through Rosetta 2. If it still does what you need, there's no urgent reason to switch. If you want native Apple silicon or built-in blocklists, look at the options above. Moving over is just copying your entries into a new profile.

Terminal + a text editor
Free

Full control, nothing to install: sudo nano /etc/hosts, add lines, save, flush DNS. There's no undo and no profiles, and a typo can break name resolution. See how to edit the hosts file safely.

SaneHosts
$14.99 One-Time

Built for blocking, not switching. Pick a protection level, from Essentials (~170K entries: ads, trackers, malware) up to Kitchen Sink (~700K), and click activate. You get 200+ curated lists from Steven Black, Hagezi, AdGuard and more, profiles for work, family or focus, macOS Touch ID or password approval before every change, automatic backups, and automatic DNS flush. Hosts data stays on your Mac. SaneHosts is listed in the StevenBlack/hosts README.

Start the 14-day trial

macOS 14 (Sonoma) or later. No credit card for the trial.

Questions people ask

What is a good Gas Mask alternative for Mac?

Gas Mask's last release (0.8.6) came out in February 2020, and its app binary is Intel-only, so it runs through Rosetta 2 on Apple silicon. Current options are SwitchHosts (free, open source, with Apple silicon builds) and SaneHosts ($14.99 once, native, with 200+ curated blocklists and five one-click protection levels).

Is there a free hosts file manager for Mac?

Yes. SwitchHosts is free and open source under Apache-2.0, and Gas Mask is free. You can also edit /etc/hosts in Terminal for free. SaneHosts is paid ($14.99 once) after a 14-day trial with no card.

Which hosts manager is best for blocking ads rather than switching dev environments?

SwitchHosts and Gas Mask are built around switching between hosts setups, which developers use for staging and local domains. SaneHosts is built around blocking: it ships 200+ curated blocklists (Steven Black, Hagezi, AdGuard and more) and five protection levels from about 170K to about 700K entries.

Does editing the hosts file block ads in every app on a Mac?

Yes for any domain listed. The hosts file is checked before DNS for every app, not just browsers. It can't block ads served from the same domain as the content, and it doesn't hide empty ad boxes the way a browser extension can.

Is changing /etc/hosts safe?

Editing it by hand can break name resolution if you make a mistake, and there's no undo. SaneHosts asks macOS for Touch ID or your password before each change, keeps backups you can roll back to, and flushes the DNS cache for you.