Interactive toolConversion & IPv6EN master
ToolIPv4Binary

IPv4 ↔ Binary Converter

Convert an IPv4 address to four 8-bit binary octets, edit octets interactively, and toggle individual bits to see the address change in real time.

Practical modeEnter your data and review the result

Interactive IPv4 ↔ Binary

Edit the four octets or toggle individual bits to see the conversion update in real time.

Octet 1192
11000000
Octet 2168
10101000
Octet 310
00001010
Octet 41
00000001
IPv4192.168.10.1
Binary11000000.10101000.00001010.00000001
Understand the result

What this tool calculates and how to interpret the result.

See an IPv4 address as 32 individual bits

An IPv4 address contains 32 bits divided into four octets. This interactive converter shows each decimal octet beside its eight-bit binary representation so you can move between human-friendly dotted decimal and the bit pattern used by subnet masks and network calculations.

You can type an address, paste a complete IPv4 value into an octet field, or toggle individual bit buttons. The result updates the decimal address and binary form together. For the underlying addressing model, review the IPv4 addressing guide.

How to use the IPv4 binary converter

Edit any of the four octets from 0 to 255. Each octet is displayed as eight positions with weights 128, 64, 32, 16, 8, 4, 2 and 1. Clicking a bit flips that position and immediately recalculates the decimal octet. You can also copy the complete binary string or the resulting IPv4 address.

If you paste a valid dotted-decimal IPv4 address, the tool fills all four octets at once. This is useful when checking an address from configuration output without manually retyping every field.

Example: 192.168.10.1 in binary

The first octet, 192, becomes 11000000 because 128 + 64 = 192. The second octet, 168, becomes 10101000. The complete address is therefore represented as four eight-bit groups. Keeping the dots between binary octets helps you retain the relationship with dotted-decimal notation.

To inspect the same address in hexadecimal, open the IPv4 ↔ hexadecimal converter. For one standalone number rather than an address, use the decimal/binary/hex converter.

Why binary matters for subnetting

A CIDR prefix says how many of the 32 bits belong to the network portion. A /24 fixes the first 24 bits, while a /26 fixes 26. The remaining bits identify positions inside that network. Seeing the address in binary makes network boundaries, block sizes and mask operations much easier to reason about.

The subnetting guide explains how these bit boundaries translate into network, broadcast and host ranges. This converter is useful beside those calculations because it exposes the exact bits instead of hiding them behind decimal notation.

Bit weights and octet values

Each bit contributes a fixed weight when it is set to one. An octet such as 00101100 equals 32 + 8 + 4 = 44. Turning one bit on or off changes the decimal value by exactly that weight. This is also the logic behind common subnet-mask octets such as 128, 192, 224, 240, 248, 252 and 254.

Practicing with the interactive bit buttons can help you recognize these patterns without memorizing a table blindly.

Validation and practical limits

Every decimal octet must stay between 0 and 255. The tool clamps typed octets above 255 and ignores non-numeric characters. Binary output is always padded to eight bits per octet, which preserves the full 32-bit shape of the address.

This converter handles IPv4 only. IPv6 uses 128 bits and hexadecimal notation, so the dedicated IPv6 compression/expansion tool is more appropriate there.

Frequently asked questions

Why does every IPv4 octet use eight bits?

IPv4 is defined as four 8-bit octets, giving a total address length of 32 bits.

Can I paste a full IPv4 address?

Yes. Pasting a valid dotted-decimal address fills all four octets automatically.

Does this calculate the subnet for me?

No. It shows the address representation. Use the CIDR and subnetting tools for network boundaries and host ranges.

Why are leading zeros kept in binary?

Every octet is always eight bits, so padding preserves the fixed-width representation needed for bit comparisons.

Next step

Once the bit pattern feels familiar, combine this converter with the CIDR calculator or mask converter to connect binary boundaries with real subnet sizes.