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.

On-device・No uploadMobile friendlyWorks offline

Your files and input are processed only inside your browser on this device and are never uploaded to our servers.

Pasted text is processed only in your browser. It is not sent or stored. This page cannot write to the system hosts file; save the file and place it yourself.

Drop a hosts file

or

One text file, up to 200 KB. Contents are not sent anywhere.Paste (Ctrl+V) also works
Paste a hosts file or drop one to see its IP and host name pairs.
Where it is on each OS, and how to apply it
  • Windows: C:\Windows\System32\drivers\etc\hosts
  • macOS and Linux: /etc/hosts
  • Editing needs administrator rights (open the editor as administrator on Windows; use sudo on macOS and Linux).
  • If the change does not apply, run ipconfig /flushdns in an administrator Command Prompt.
  • On macOS, run sudo killall -HUP mDNSResponder (as Apple documents).
  • Linux depends on the name resolver in use, so no steps are given here.
  • Browsers cache name lookups too, so try restarting the browser.

How to use

  1. hosts

    Paste or drop a hosts file

  2. Findings by line

    Table of IPs and names, and findings

  3. hosts (LF or CRLF)sorted, deduplicated

    Tidy and export

Paste a hosts file, fix the findings and export it
  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.

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.

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

Capability matrix

FeatureSupportNotes
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 CRLFSupported—
Writing directly to the system hosts fileNot supportedA browser cannot write it. Place the saved file yourself with administrator rights
Name resolution (checking which IP a name reaches)Not supportedNo network requests and no DNS lookups
How duplicates are handled by each OSPartialShows the common behaviour (first line wins). It can differ by OS and version
Wildcard (*) host namesNot supportedhosts 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.

IP / CIDR / Subnet Calculator

Enter an IP address or CIDR to get the network, broadcast, usable host range and subnet mask instantly. Split networks (VLSM), convert ranges to CIDR and check IP lists — for both IPv4 and IPv6.

No upload

SSH Config Studio

Paste your ~/.ssh/config to see the settings for each Host and the values that actually apply when you connect to a host name you choose. The first value found wins, so a Host * placed first hides later settings, and this tool flags that. It does not read Include files. To check how names resolve, use Hosts Studio.

No upload

Text Studio — Character Counter & Text Cleaner

Paste text to see characters, words, lines and bytes instantly, then clean it up in one click — change case, remove duplicate or blank lines, sort naturally, convert line breaks. Every action reports what changed and can be undone.

No upload

.env Studio

Paste or drop a .env file to see its keys and values in a table, with duplicates, empty values and syntax problems flagged by line. Values are hidden by default. You can compare a .env with a .env.example, or export an example file, JSON or a Kubernetes Secret. It checks common dotenv syntax, not tool-specific rules such as docker compose variable expansion.

No upload

Apache Config Studio

Paste .htaccess, httpd.conf or a VirtualHost to see its section tree and line-numbered findings: unclosed sections, unknown directives and overly open settings. You can also generate HTTPS redirect, www and HSTS snippets.

No upload

Caddyfile Studio

Paste a Caddyfile to see its site blocks, snippets ((name) and import) and matchers (@name) as a tree, with line-numbered findings for unbalanced braces and undefined references. You can also make reverse proxy, static site, SPA and www redirect templates.

No upload

Last updated: