You don't have javascript enabled. Please enable javascript to use this website.

IP to Binary Converter

Convert any IPv4 or IPv6 address to its 32-bit or 128-bit dotted binary representation — single or bulk list mode.
IP Address:
Convert Now Clear
More Tools

IP to Binary Converter — IPv4 and IPv6 Address Conversion

IP to binary conversion translates any IPv4 or IPv6 address into its base-2 representation — the format network hardware and routing software use internally. IPv4 addresses (RFC 791) produce four 8-bit groups separated by dots: 192.168.1.1 becomes 11000000.10101000.00000001.00000001. IPv6 addresses (RFC 4291) produce 128 bits across sixteen 8-bit groups. Enter a single address or paste a bulk list — one address per line — and conversion runs entirely in your browser; no data is transmitted or stored.

What the Binary Output Shows

Output Field IPv4 IPv6
Total bits 32 bits 128 bits
Group structure 4 × 8-bit octets 16 × 8-bit groups
Separator character Dot (.) Colon (:)
Example input 192.168.1.1 2001:db8::1
Example binary output 11000000.10101000.00000001.00000001 0010000000000001:1101101110000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000000:0000000000000001
Governing RFC RFC 791 RFC 4291

How IP to Binary Conversion Works

IPv4 — RFC 791: Each of the four decimal octets (0–255) maps to exactly 8 binary digits using positional notation based on powers of 2: 128, 64, 32, 16, 8, 4, 2, 1. For each bit position, a 1 is written if the remaining value is greater than or equal to that power of 2, a 0 otherwise. For example, 192 = 128 + 64, producing 11000000. Leading zeros are always added to maintain the fixed 8-bit width. The four groups are dot-separated to produce the 32-bit dotted binary form.

IPv6 — RFC 4291: IPv6 addresses are expressed in hexadecimal. Each hex digit maps directly to 4 binary digits — for example, hex 'c' = binary 1100. The converter first expands any :: zero-compression notation to its full 128-bit form, then converts each hex digit to its 4-bit binary equivalent, grouping the result into sixteen 8-bit segments separated by colons. The output is always exactly 128 binary digits.

Subnet Masks in Binary: The most common application of binary IP conversion is subnet mask analysis. The mask 255.255.255.0 (/24) converts to 11111111.11111111.11111111.00000000 — 24 consecutive 1-bits define the network portion, 8 zero-bits define the host range. Converting both the IP address and its subnet mask to binary with the same tool reveals which bits identify the network and which address individual hosts within it. This is the standard method used in CCNA and CompTIA Network+ certification training.


How to Use the IP to Binary Converter

Convert any IPv4 or IPv6 address to binary in seconds — single address or a bulk list.

1

Enter an IP Address

Type or paste any IPv4 address (e.g. 192.168.1.1) or IPv6 address (e.g. 2001:db8::1) into the input field. For bulk conversion, paste multiple addresses — one per line, one address each.
2

Click Convert to Binary

Press the Convert to Binary button. The converter processes every address entirely in your browser — no data is sent to any server at any point.
3

Read the Binary Output

Each IPv4 address produces four 8-bit groups separated by dots — one group per decimal octet, zero-padded to exactly 8 digits. IPv6 addresses produce 128 bits across sixteen 8-bit groups.
4

Use the Results

Copy the binary output for subnet calculations, coursework, or routing analysis. In bulk mode, each input address appears on its own line alongside its binary result.

When IP to Binary Conversion Is Needed

Subnet calculation: A network engineer designing a /26 subnet needs to verify host bit availability. Converting 192.168.1.64 to binary produces 11000000.10101000.00000001.01000000 — the first 26 bits are the network portion, and the final 6 bits define the host range of 64 addresses (0–63). Comparing the binary forms of multiple addresses makes network boundary errors immediately visible.

Certification exam preparation: A student studying for CCNA or CompTIA Network+ uses bulk mode to convert an entire subnet range to binary at once — pasting 20 or 30 practice addresses in a single pass and verifying manual calculations against the tool output, significantly cutting study time per subnet problem.

IPv6 prefix analysis: A developer building a routing policy for a dual-stack application needs to compare IPv6 prefixes at the bit level. Converting 2001:db8::/32 prefix addresses to binary makes prefix overlap detection direct — the first 32 binary digits must match, which is immediately verifiable without manual hex-to-binary arithmetic.


Frequently Asked Questions

What is IP to binary conversion?
IP to binary conversion translates a decimal IP address into its base-2 representation — the format network hardware and routing protocols use internally. IPv4 uses a 32-bit structure divided into four 8-bit octets (RFC 791), while IPv6 uses 128 bits across eight 16-bit groups (RFC 4291). The dotted-decimal notation humans read is a presentation layer; the binary form is the actual address the hardware processes.
How is an IPv4 address converted to binary?
Each of the four decimal octets (0–255) is independently converted to an 8-bit binary number using positional notation — the bit positions represent powers of 2: 128, 64, 32, 16, 8, 4, 2, 1. For example, 192 = 128 + 64, so the binary is 11000000. Leading zeros are always included to maintain 8-bit width per octet, as required by the 32-bit fixed-length format defined in RFC 791. The four groups are then joined with dots.
What is the difference between IPv4 and IPv6 binary output?
IPv4 binary output is 32 bits — four 8-bit groups separated by dots, for example 11000000.10101000.00000001.00000001. IPv6 binary output is 128 bits — sixteen 8-bit groups, because each of IPv6's eight 16-bit hexadecimal groups expands to 16 binary digits per RFC 4291. IPv6 binary strings are primarily used in prefix analysis and routing policy work, where bit-level matching is required.
Why does my IPv6 address produce such a long binary string?
IPv6 is a 128-bit protocol per RFC 4291 — four times the size of IPv4. Each hexadecimal digit in an IPv6 address expands to exactly 4 binary digits (e.g., hex 'a' = binary 1010), producing a 128-digit binary string. If the address uses :: compression notation, the converter first expands it to its full 128-bit uncompressed form before converting. This is expected and correct.
Do you store the IP addresses I convert?
No. The IP to Binary Converter runs entirely in your browser — no data is sent to any server at any point. Conversion is performed by JavaScript on your device, and no addresses, inputs, or outputs are transmitted or stored. This applies equally to single address and bulk list mode.

Related Guides

Guide What Is IPv4? — The 32-Bit Address Structure Explained
Covers the four-octet structure, address classes, and why binary matters for subnet mask calculation.
Guide What Is IPv6? — The 128-Bit Address Format Explained
Explains hexadecimal notation, :: compression, and the 128-bit binary structure produced by this converter.