# Hosts Studio

Paste a hosts file to see its IP and host name pairs in a table, with format errors, duplicates and changed localhost lines flagged by line number. It checks the syntax of hosts entries (IP, whitespace-separated names, # comments). It does not resolve names or write to your system. Save the output file and place it in the system hosts location with administrator rights.

- URL: https://tools.itlibra.com/en/hosts-studio
- On-device・No upload
- Last updated: 2026-10-26

## How to use

1. Paste the contents of a hosts file, or drop the file. “Try a sample” loads an example with duplicates and format errors.
2. Check the table of IPs and names. In “Findings”, see format errors, repeated host names, changed localhost lines, and trailing spaces or mixed tabs, each with its line number.
3. In “Tidy”, sort the lines, remove duplicates, comment out lines with errors, or turn loopback entries into 0.0.0.0 blocks. Choose LF or CRLF line endings.
4. Use “Save” to export the hosts file. Placing it in the system location (below) needs administrator rights.

## Use cases

- Check the syntax of a hosts file before pointing a name at another IP for development
- Build a list that points advertising or tracking host names to 0.0.0.0
- Find out which of two entries for the same host name is used
- Check where the hosts file is and how to make a change take effect on Windows and macOS

## What it does

### IPv4 and IPv6 format checks

IPv4 must be four numbers from 0 to 255 (a leading zero is invalid). IPv6 checks the :: abbreviation and an IPv4 tail.

### Duplicates by line number

When the same host name is given a different IP, the earlier line is shown. Some systems treat this differently, so the page says so.

### Checks localhost

Checks the localhost lines for 127.0.0.1 and ::1. Flags a localhost pointing to another IP, or a missing 127.0.0.1 line.

### Tidy options

Sort (IPv4 numerically), remove duplicates, comment out lines with errors, and block by changing 127.0.0.1 and ::1 to 0.0.0.0 (localhost lines are kept).

### Save as LF or CRLF

The tidied text is saved as a file named hosts, with LF or CRLF line endings. No byte order mark is added.


## Capability matrix

| Feature | Support | Notes |
| --- | --- | --- |
| Table of IPs and names, with line-numbered findings (format, duplicates, localhost, whitespace) | Supported | — |
| Sort, dedupe, comment out, block with 0.0.0.0, and save as LF or CRLF | Supported | — |
| Writing directly to the system hosts file | Not supported | A browser cannot write it. Place the saved file yourself with administrator rights |
| Name resolution (checking which IP a name reaches) | Not supported | No network requests and no DNS lookups |
| How duplicates are handled by each OS | Partial | Shows the common behaviour (first line wins). It can differ by OS and version |
| Wildcard (\*) host names | Not supported | hosts files do not support them, so they are flagged |

## Limits & notes

- Input is limited to 200,000 characters and 5,000 lines. Anything beyond is not read, and you are told. The file size limit is 200 KB.
- The findings cover syntax and duplicates. They do not check whether a host name exists or which IP it reaches.
- Placing the saved file in the system location is up to you. Afterwards, clear the cache or restart the browser before you check.

## Privacy & safety

Pasted text and files are processed only inside your browser. Nothing is sent to or stored on a server, and nothing is saved in the browser. Usage analytics never include content or file names.

## FAQ

### Where is the hosts file?

On Windows it is C:\\Windows\\System32\\drivers\\etc\\hosts. On macOS and Linux it is /etc/hosts. Editing it needs administrator rights (run the editor as administrator on Windows, or use sudo on macOS and Linux).

### What happens if the same host name appears twice?

In many setups the IP on the earlier line is used. Some systems and browsers treat it differently, so keeping one entry per name is the safe choice.

### My change to the hosts file does not take effect. Why?

The name lookup may be cached. On Windows, run ipconfig /flushdns in an administrator Command Prompt. On macOS, run sudo killall -HUP mDNSResponder. Browsers keep their own cache too, so try restarting the browser.

### Is blocking ad or tracking hosts with 0.0.0.0 safe?

It is a common method, but any site or app that uses the blocked name stops working. Changing the IP of a real server to 0.0.0.0 stops you reaching it, so leave the hosts you use unchanged.

### Why does the tool keep the localhost lines?

Many programs use localhost for internal traffic. The tool does not change localhost to 0.0.0.0. It flags a localhost line that points to another IP, and a missing 127.0.0.1 line.
