
Best Hosts File Editors for Windows 11 (2026, Free and Paid)
Best hosts file editors for Windows 11 in 2026: PowerToys, Hosts File Editor, SwitchHosts, HostsMan, ToggleHosts and Notepad compared on price, backups and DNS flush.
Direct answer: The best hosts file editor for Windows 11 depends on how often you change C:\Windows\System32\drivers\etc\hosts. For occasional edits, Microsoft PowerToys Hosts File Editor is the best free choice. For free, cross-platform profiles, pick SwitchHosts. If you switch between local, staging, and client setups every week, ToggleHosts ($4.99 one-time) adds named environments, a diff before every write, backups, and a DNS flush in the same click.
We make ToggleHosts, so read that last recommendation with that in mind. The tool details below come from each project's own documentation and release pages, checked in November 2026, and the matrix says plainly what we could not verify.
Quick picks
- Best free pick for most people: PowerToys Hosts File Editor. Maintained by Microsoft, with a toggle per entry and automatic backups.
- Best free and cross-platform: SwitchHosts. Actively maintained, with Windows, macOS, and Linux builds.
- Best free and portable: Hosts File Editor by Scott Lerch. A ZIP you unpack and run, for x64 and ARM64.
- Best for weekly environment switching: ToggleHosts. Named environments, a diff before each write, backups, and DNS flush.
- Legacy: HostsMan. Last released in January 2017, and Windows 11 is not on its supported list.
- Emergency only: Notepad run as administrator.
Not on Windows? The same comparison exists for Mac and Linux.
What to look for in a Windows hosts editor
- Elevation that fails loudly. The hosts file is protected, so a failed save must be obvious.
- Toggles. Disable a line without deleting it.
- Backups. Restore the previous file without digging through
drivers\etc. - DNS flush. Automatic beats remembering
ipconfig /flushdns. - Environments. Local, staging, and client sets without comment blocks.
- Maintenance. An editor that writes a system file with administrator rights should still receive updates.
- Platforms. Will a Mac or a Linux machine join the team?
Feature comparison (checked November 2026)
| Tool | Price | Platforms | Latest release | Backups | Environments or profiles | DNS flush |
|---|---|---|---|---|---|---|
| ToggleHosts | $4.99 one-time | Windows, macOS, Linux | Actively maintained | Before every write, one-click restore | Named environments | Built into Apply |
| PowerToys Hosts File Editor | Free | Windows | Part of PowerToys (Microsoft) | Automatic, once per editing session | One list with Active toggles | Not documented |
| Hosts File Editor (Scott Lerch) | Free | Windows | v1.5.2, July 2026 | Not verified | One list | Not verified |
| SwitchHosts | Free, Apache-2.0 | Windows, macOS, Linux | v5.0.3, October 2026 | Import and export | Local, remote, group, and folder entries | Post-apply command you set up |
| HostsMan | Freeware | Windows | 4.7.105, January 2017 | Not verified | Not verified | Not verified |
| Notepad | Built in | Windows | Part of Windows | None | None | Run ipconfig /flushdns |
"Not verified" means we could not confirm it from the project's own pages, not that the feature is missing.
ToggleHosts
ToggleHosts is a desktop hosts manager for Windows, macOS, and Linux. On Windows it replaces the Notepad ritual: you keep entries in named environments, switch them on and off, and Apply validates the entries, shows a diff of the exact lines that will change, backs the file up, writes it after your UAC approval, then flushes the system and configured browser DNS caches.
Pros
- Environments, so staging and local sets do not live in comment blocks
- A diff before every write, and a backup you restore in one click
- DNS flush as part of Apply, for the system and the browsers you configure
- Entries are validated before they reach the system file
- The same app on macOS and Linux for mixed teams
Cons
- Paid: $4.99 once, with one year of updates included
- No free trial (the homepage demo runs the loop in your browser)
- More than you need if you edit hosts twice a year
Best for: developers and agencies who switch project domains weekly and are tired of "why did the change not apply?"
See the loop before you buy: the interactive demo runs in your browser with nothing to install.
Microsoft PowerToys Hosts File Editor
The PowerToys Hosts File Editor is free and ships inside PowerToys. Turn it on in the PowerToys settings, then open it from the PowerToys icon in the system tray, because it cannot be launched with a keyboard shortcut. You add an entry with an IP address, host names, an optional comment, and an Active toggle, and you can filter by address, host, or comment.
Microsoft documents a backup before each editing session. The default file is named hosts_PowerToysBackup_ followed by a timestamp and sits next to the hosts file. Backups are deleted after 15 days, but the five most recent are always kept, and you can change that in the settings. The Open as administrator setting matters: when it is off, the editor is read-only, and a save fails with "Failed to save hosts file".
Pros
- Free, documented by Microsoft, and updated with PowerToys
- Table with Active toggles and filtering
- Automatic backups with a retention policy
- Settings for where new entries go (top or bottom) and for duplicate loopback entries
Cons
- Windows only
- One list: no named environments
- No DNS flush step in Microsoft's documentation, so run
ipconfig /flushdnsyourself - You install a large utility suite for one tool
Best for: a Windows-only machine that needs safe, occasional edits without buying anything.
Deep dive: ToggleHosts vs PowerToys Hosts File Editor.
Hosts File Editor by Scott Lerch
Hosts File Editor is an open-source utility for editing the hosts file on Windows. It is still developed: the latest release, v1.5.2, came out in July 2026, as portable ZIP builds for x64 and ARM64. You unpack it and run it, with no installer, which is why it suits a USB stick or a locked-down machine.
Pros
- Free and portable (ZIP, x64 and ARM64)
- Row-level enable and disable, a clear step up from Notepad
- Maintained: a release this year
Cons
- Windows only
- We could not verify built-in backups or a DNS flush, so plan to do both by hand
- One flat list, so grouping is up to you
Best for: simple free toggles on a single Windows PC, or a portable tool you carry around.
Deep dive: ToggleHosts vs Scott Lerch Hosts File Editor.
SwitchHosts
SwitchHosts is a free, open-source (Apache-2.0) hosts manager. Version 5.0.3 came out in October 2026 with installers for Windows (x64, x86, ARM64), macOS, and Linux (AppImage, deb, rpm). It manages local, remote, group, and folder entries, switches them from the main window or the system tray, and can refresh remote hosts manually, on a schedule, or at startup. Its preferences include a post-apply command, which is how you add a DNS flush after each switch.
Pros
- Free, open source, and actively maintained
- Windows, macOS, and Linux with the same workflow
- Groups, folders, and remote hosts lists
- Import and export, good for sharing with a team
Cons
- No flush out of the box: you configure a post-apply command
- No before-write diff in its documented feature list
- More utilitarian than polished
Best for: developers who want free cross-platform profiles and are happy to wire up the flush themselves.
Deep dive: ToggleHosts vs SwitchHosts.
HostsMan
HostsMan was a popular freeware hosts manager. Its official page lists version 4.7.105, released in January 2017, and supported systems from Windows XP to Windows 10 (plus Windows Server 2003 to 2012 R2). Windows 11 is not on that list.
Pros
- Freeware
- More structure than raw text for older workflows
Cons
- Last release in January 2017
- Writing a protected system file with a tool that is no longer updated is a trust problem
- Windows only
Best for: moving off it. Export your hosts text and migrate.
Deep dive: ToggleHosts vs HostsMan. Looking for a replacement? See HostsMan alternatives.
Notepad (Run as administrator)
Notepad still works, and it is where most hosts file accidents start: a hosts.txt save, a copy edited in Downloads, a missing elevation, a forgotten DNS flush.
Pros
- Already installed
- Fine for one emergency line
Cons
- Easy to save the wrong filename
- No toggles, environments, or backups
- No validation of malformed lines
- You must flush DNS yourself
Best for: rare edits, with a checklist. Use the Windows 11 hosts guide and flush DNS on Windows every time. If you edit weekly, move to a real manager.
How to choose in practice
- A rare override on one PC: PowerToys if it is installed, Notepad as administrator otherwise.
- Free toggles on one PC, nothing to install: Hosts File Editor (portable).
- Free profiles across Windows, Mac, and Linux: SwitchHosts.
- Leaving HostsMan: SwitchHosts for free, ToggleHosts if you want diff, backups, and flush built in.
- Daily local development with staging sets: ToggleHosts.
Syntax mistakes matter whichever editor you pick. Keep the hosts syntax guide close, and never put a port or http:// in a host name.
Workflow examples
Preview a client site before DNS flips
You map client.example to the new server IP, load the site, and need the browser to honor it right away. Notepad writes the line, but a forgotten ipconfig /flushdns costs the next ten minutes. With ToggleHosts the flush is part of Apply. With PowerToys or Hosts File Editor it is a step you remember. See flush DNS on Windows.
Staging vs production hostnames
Agencies keep two sets: staging IPs for QA, and nothing for "browse the real site". Comment blocks in Notepad rot. SwitchHosts groups and ToggleHosts environments keep them separate. A flat list can toggle rows, but you invent the grouping yourself.
Windows with WSL2
WSL2 has its own /etc/hosts, separate from the Windows file, so a change in one does not reach the other. See syncing the Windows hosts file with WSL2 before you decide which editor owns which file.
Mixed Windows, Mac, and Linux teams
A Windows-only pick (PowerToys, Hosts File Editor, HostsMan) forces a second standard on the other machines. SwitchHosts and ToggleHosts run on all three: SwitchHosts when open source is a hard requirement, ToggleHosts when the diff, backups, and automatic flush matter more than a zero price.
Migration cheat sheet
Moving between tools is usually "copy the text, then regroup":
- Copy
C:\Windows\System32\drivers\etc\hoststo a dated file in your documents. - Import that text into the new editor.
- Recreate profiles or environments with clear names, such as
client-a-local. - Check that one known host name resolves after a toggle.
- Stop using the old elevated editor so two apps never overwrite each other.
From HostsMan, plan to rebuild groups by hand. From PowerToys or Hosts File Editor, the flat list usually imports cleanly. From SwitchHosts, export your groups first, then map them to environments.
Windows pitfalls any editor should prevent
- Saving as
hosts.txtinstead ofhosts. - Editing a copy in Downloads instead of
System32\drivers\etc. - Forgetting administrator rights, then wondering why nothing changed.
- Skipping the DNS flush after a successful save.
- Letting one giant uncommented file grow instead of using environments.
- Blaming the hosts file when a browser cache or VPN is the cause: test in a fresh private window after the flush.
- Running two hosts editors at once and losing track of which one saved last.
Is a paid manager worth it?
Only if hosts edits are part of your week. If you touch the file twice a year after a server migration, PowerToys or Notepad is the rational choice and $4.99 is wasted. If you toggle domains between stand-ups, the diff before each write, the backup, and the automatic flush pay for themselves quickly.
Related guides
- PowerToys Hosts alternative: ToggleHosts vs PowerToys
- Hosts File Editor alternative: ToggleHosts vs Scott Lerch
- HostsMan alternative: ToggleHosts vs HostsMan
- SwitchHosts vs ToggleHosts
- Edit the hosts file on Windows 11
- Flush DNS on Windows
- Terminal vs GUI for editing hosts files
_Last reviewed: November 2026 on Windows 11._
Sources and further reading
Frequently Asked Questions
For occasional edits, Microsoft PowerToys Hosts File Editor is the best free choice: it is maintained by Microsoft, toggles entries on and off, and backs the file up before each editing session. For free cross-platform profiles, SwitchHosts is the strongest option. If you switch environments every week, a paid manager such as ToggleHosts adds environments, a diff before each write, and a DNS flush in the same step.
Yes for most one-off edits. It gives you a table of entries with an Active toggle, filtering, and automatic backups named hosts_PowerToysBackup_ followed by a timestamp. It keeps a single list rather than named environments, it cannot be opened with a keyboard shortcut, and Microsoft documents no DNS flush step, so you still run ipconfig /flushdns yourself.
Yes, but run Notepad as administrator, open C:\Windows\System32\drivers\etc\hosts with the file type set to All files, save it without a .txt extension, then run ipconfig /flushdns. A dedicated editor removes those traps. See the Windows 11 guide for the step-by-step method.
Some do. ToggleHosts flushes the system and configured browser DNS caches as part of Apply. With Notepad and PowerToys you run ipconfig /flushdns yourself, and SwitchHosts can run a post-apply command that you configure.
Related Articles
Hosts File Location on Windows 11 and How to Edit It (2026)Editing the hosts file
Hosts File Location on Windows 11 and How to Edit It (2026)
9 min read
Flush DNS on Windows: ipconfig /flushdns and Elevation FixFlushing DNS & cache
Flush DNS on Windows: ipconfig /flushdns and Elevation Fix
5 min read
Best Hosts File Editors for Linux (2026, GUI and CLI)Comparisons & tools
Best Hosts File Editors for Linux (2026, GUI and CLI)
8 min read