FormatterHQ

IP to Binary Converter

Write an IPv4 address as four 8-bit binary octets, with network and host bits marked, so you can see exactly where a subnet mask splits them.

Loading tool…
Ready.

How to use the IP to Binary Converter

  1. Type or paste an IPv4 address in dotted-decimal form into the address field.
  2. The results update as you type; each octet is turned into exactly eight bits.
  3. Read the Binary row as four dot-separated groups of 0s and 1s.
  4. Copy the row, or drag the Prefix length slider to line the bits up against a subnet mask.

IP to binary: see the 32 bits behind an address

Routers never see "192.168.1.1"; they see 32 bits. Converting IP to binary shows those bits, grouped into four octets of eight, so you can reason about subnet masks, prefixes and address classes the same way network hardware does.

Place values of an octet

Each octet is an 8-bit number with the place values 128, 64, 32, 16, 8, 4, 2 and 1. Subtract the largest value that fits, write a 1, and continue with the remainder:

DecimalSum of place valuesBinary
192128 + 6411000000
168128 + 32 + 810101000
3732 + 4 + 100100101
1100000001

Every octet is padded to eight digits. Without padding, 10.1.1.1 would read as 1010.1.1.1, and the columns would no longer line up against a mask.

192.168.1.1   →  11000000.10101000.00000001.00000001
10.0.0.254    →  00001010.00000000.00000000.11111110
8.8.8.8       →  00001000.00001000.00001000.00001000

Why binary matters for subnetting

A subnet mask is a run of 1s followed by 0s. The network address is the bitwise AND of the address and the mask. Take 192.168.10.37 with the /26 mask 255.255.255.192:

address  11000000.10101000.00001010.00100101
mask     11111111.11111111.11111111.11000000
AND      11000000.10101000.00001010.00000000  = 192.168.10.0

The first 26 bits identify the network; the last six (100101 = 37) identify the host inside it. The CIDR calculator performs this for you and lists the whole range, and the AND calculator lets you try the operation on any two values.

Private address ranges in binary

The three private IPv4 blocks look arbitrary in decimal, but in binary each one is simply a fixed prefix:

10.0.0.0/8      00001010.xxxxxxxx.xxxxxxxx.xxxxxxxx
172.16.0.0/12   10101100.0001xxxx.xxxxxxxx.xxxxxxxx
192.168.0.0/16  11000000.10101000.xxxxxxxx.xxxxxxxx

The middle row explains the odd range from 172.16 to 172.31. Only the first four bits of the second octet are fixed (0001), and the remaining four can be anything, from 00010000 (16) to 00011111 (31). An address such as 172.32.0.1 has 00100000 there, so it falls outside the block and is a public address. Loopback works the same way: every address whose first octet is 01111111 (127) belongs to 127.0.0.0/8.

Leading bits and the old address classes

Before CIDR, the first bits of an address decided its class: 0 meant class A, 10 class B, 110 class C and 1110 class D (multicast). In binary this is obvious at a glance: 192 starts with 110, so 192.168.1.1 was a class C address. Classes no longer control routing, but the terms still appear in documentation.

Validation and privacy

The address must hold four decimal octets from 0 to 255; anything else is marked invalid, with an error that quotes the value. To read binary back into dotted form, use Binary to IP. The conversion runs in your browser, so nothing you type is uploaded.

Frequently asked questions

What is 192.168.1.1 in binary?
It is 11000000.10101000.00000001.00000001. Each of the four octets is written as eight bits, giving 32 bits in total.
Why is every octet padded to eight bits?
An IPv4 address is exactly 32 bits, and each octet occupies a fixed 8-bit slot. Padding keeps every bit in its position, which is what lets you compare an address with a subnet mask column by column.
How do I find the network address using binary?
Write the address and the mask in binary and AND them bit by bit: a result bit is 1 only where both inputs are 1. The result is the network address.
Can I convert IPv6 addresses here?
If you type an IPv6 address, the page switches to an IPv6 panel that shows its 128 bits. The IPv6 to Binary converter is the dedicated page for that, with the expanded and compressed forms explained.

Last updated October 3, 2026

Guides

Related tools