๐Ÿฆ IP Animals
๐Ÿงฎ Subnetting & IP Math

IPv4 to Binary Converter

Convert any IPv4 address to its 32-bit binary form โ€” octet by octet and as one continuous string โ€” then convert binary straight back to a dotted IP. Runs entirely in your browser.

Accepts dotted octets or 32 bits in a row (spaces and dots ignored).

How IPv4 addresses become binary

An IPv4 address such as 192.168.0.1 looks like four decimal numbers, but underneath it is really a single 32-bit number. Each of the four parts โ€” called octets โ€” is one byte, or 8 bits, holding a value from 0 to 255. To see the binary, you convert each octet to 8 bits and pad it with leading zeros so every octet is exactly 8 characters wide.

Walking through 192.168.0.1: 192 is 11000000, 168 is 10101000, 0 is 00000000 and 1 is 00000001. Join them and you get 11000000.10101000.00000000.00000001, or as one 32-bit string, 11000000101010000000000000000001.

๐Ÿ’ก Why bother with binary?

Subnet masks, CIDR prefixes and wildcard masks all operate bit-by-bit. When you can read an address in binary, the boundary between the network portion and the host portion becomes visible โ€” which is exactly what a subnet mask defines.

Reading it back

The reverse is just as mechanical: chop the 32 bits into four groups of 8, read each group as a binary number, and you are back to dotted decimal. This converter tolerates messy input โ€” it strips dots and spaces, so you can paste either a nicely formatted address or a raw run of bits.

If binary feels abstract, it helps to remember what an address is actually doing. Our guide to what an IP address is covers the bigger picture, and if you want the numeric side, try the IP โ†’ Decimal converter to see the same address as a single integer, or the IP โ†’ Hex converter for its hexadecimal form.

Everything here happens on your own device. No address you enter is transmitted, stored or logged anywhere โ€” it is pure client-side JavaScript, so it works offline once the page has loaded.

Frequently asked questions

How do you convert an IP address to binary?

Each of the four octets is a number from 0 to 255, which fits in exactly 8 bits. Convert each octet to its 8-bit binary value (padding with leading zeros) and join them with dots. For example, 192.168.0.1 becomes 11000000.10101000.00000000.00000001.

How many bits are in an IPv4 address?

An IPv4 address is 32 bits long, arranged as four 8-bit octets. That gives 232, or roughly 4.29 billion, possible addresses โ€” the shortage that IPv6 was designed to solve.

Why is binary useful for subnetting?

Subnet masks and CIDR prefixes work at the bit level. Seeing an address in binary makes it obvious which bits identify the network and which identify the host โ€” the core idea behind subnetting.

Does this converter send my IP anywhere?

No. All conversion happens locally in your browser with JavaScript. Nothing you type is uploaded, logged or sent to any server.

Want the theory? Read the guides โ†’ ยท Visit the zoo โ†’