IP Address to Binary Converter |
The direction is detected from what you paste. One per line for many; results update as you type.
How to Convert an IP Address to Binary
To convert an IP address to binary, write each octet as 8 bits: 192.168.1.1 becomes 11000000.10101000.00000001.00000001. Add a prefix like /24 to see which bits are the network and which the host. IPv6 addresses work too: 128 bits in 8 groups of 16.
Use the place values 128, 64, 32, 16, 8, 4, 2, 1: 192 = 128 + 64 → 11000000. Go through the values from the left, write 1 when the value fits into what's left of the number and subtract it, otherwise write 0.
| Octet | 128 | 64 | 32 | 16 | 8 | 4 | 2 | 1 |
|---|---|---|---|---|---|---|---|---|
| 192 | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 0 |
| 168 | 1 | 0 | 1 | 0 | 1 | 0 | 0 | 0 |
| 77 | 0 | 1 | 0 | 0 | 1 | 1 | 0 | 1 |
Network and Host Bits
With a /24 mask, the first 24 bits are the network and the last 8 the host.
A prefix length counts the 1 bits of the subnet mask from the left. Lining the mask up under the address shows the split: where the mask has 1, the address bit belongs to the network; where it has 0, to the host. Setting all host bits to 0 gives the network address. In the example above, 192.168.1.77/26 has the network 192.168.1.64/26 and the mask 255.255.255.192. For the full ranges, use the subnet calculator.
How to Convert Binary Back to an IP
Split 32 bits into four groups of 8 and add the place values of each 1.
11000000 = 128 + 64 = 192. The converter accepts dotted groups, spaces, or all 32 (or 128) bits in a row, and checks that the count is right instead of guessing.
IPv6 in Binary
Each of the 8 groups is 16 bits; the first 64 bits are usually the network prefix.
Each hex digit is 4 bits, so a group like 0db8 is 0000 1101 1011 1000. Most IPv6 networks are /64: the first 64 bits identify the network and the last 64 the device. Enter an IPv6 address with /64 to see it.
How This Tool Works
| Item | Detail |
|---|---|
| Where it runs | In your browser; nothing is sent to our server. |
| Input checks | Strict: each IPv4 number 0-255 in decimal, IPv6 in any standard form (including ::ffff:192.0.2.1 and zones). Invalid input gets the reason, never a silent guess. |
| Many at once | One value per line, up to 1,000 lines; each line is converted on its own. |
| Shareable link | ?q= followed by a value opens the page with it converted. |
| Stored | Nothing. |
| Last verified | 10 November 2026 |
Frequently Asked Questions
How do you convert an IP address to binary?
Why is 255 written as 11111111?
How do I find the network part in binary?
How do I convert binary to an IP address?
Next steps