IPv4 ↔ Binary Converter

Convert an IPv4 address to binary, octet by octet, or convert a binary address back to dotted-decimal notation.

Input

For Binary → IPv4, use dot-separated 8-bit groups, e.g. 11000000.10101000.00000001.00001010

Results

IPv4
—
Binary
—

Octet Breakdown

OctetDecimalBinary

Overview

The IPv4 ↔ Binary Converter shows an IPv4 address as its 32 binary digits, octet by octet, and converts binary back to dotted-decimal. It exists to make the bit-level view of addressing visible, because every subnet, mask, and routing decision is ultimately a comparison of bits.

It is most useful to students learning subnetting and to engineers who want to confirm by eye why an address does or does not fall inside a given prefix.

How It Works

Each octet of an IPv4 address is an 8-bit number from 0 to 255. Reading the bits left to right, they carry the place values 128, 64, 32, 16, 8, 4, 2, 1. An octet is converted to binary by finding which of those values add up to it; going the other way, you add up the place values wherever there is a 1.

The converter validates the input first. For IPv4 → binary, each octet must be 0–255 with no leading zeros. For binary → IPv4 you must supply four dot-separated groups of 1–8 binary digits; a group shorter than 8 digits is padded on the left with zeros (so 1 is read as 00000001). The conversion happens entirely in your browser.

How to Use the IPv4 ↔ Binary Converter

  1. Choose the direction: IPv4 → Binary or Binary → IPv4.
  2. Enter the value, for example 192.168.1.10 or 11000000.10101000.00000001.00001010.
  3. Press Calculate to see the full result and a table that breaks it into octets.
  4. Use Copy Results to paste the conversion elsewhere.

Worked Example

Why is 192.168.1.10 written that way in binary?

You want to see the bit pattern of 192.168.1.10 and confirm that converting it back gives the same address.

Input

IPv4 -> Binary: 192.168.1.10

Output

192.168.1.10 ->
11000000.10101000.00000001.00001010

Octet 1: 192 = 11000000
Octet 2: 168 = 10101000
Octet 3:   1 = 00000001
Octet 4:  10 = 00001010

Binary -> IPv4: 11000000.10101000.00000001.00001010 -> 192.168.1.10

192 = 128 + 64, so the bits for 128 and 64 are on: 11000000. 168 = 128 + 32 + 8: 10101000. 1 is just the lowest bit: 00000001. 10 = 8 + 2: 00001010.

Now you can see subnetting as bit comparison. For a /26 mask, the first 26 bits (all of the first three octets plus the top two bits of the fourth) are the network part. The address's last octet starts 00, so it belongs to the subnet whose last octet is 00000000, namely 192.168.1.0/26.

Interpreting Results

Full binary string
Four groups of eight bits separated by dots, 32 bits in total.
Octet table
Each row pairs a decimal octet with its 8-bit pattern, which is the easiest way to check your own manual conversions.
Round-trip
Converting the binary result back should always return the address you started with.

Troubleshooting

"Please enter a valid IPv4 address."
Check for an octet above 255, a missing octet, or a leading zero such as 192.168.01.1.
"Invalid binary IPv4 address."
You need exactly four groups separated by dots, each containing only 0s and 1s and at most 8 digits.
The binary I pasted has no dots.
Split the 32 bits into four groups of 8 and add dots, for example 11000000101010000000000100001010 becomes 11000000.10101000.00000001.00001010.

Limitations and Accuracy

  • IPv4 only; IPv6 addresses are 128 bits and are written in hexadecimal.
  • The tool converts a single address at a time. It does not apply masks — use the Subnet Calculator for that.

Data Handling

Runs in your browser. What you enter is processed on your device and is not sent to NetEngToolkit’s servers or to any third party.

Frequently Asked Questions

Why does each octet have exactly eight bits?

Because an IPv4 address is 32 bits split into four 8-bit octets. An octet value of 0–255 is exactly what 8 bits can hold.

What is the quickest way to convert an octet by hand?

Subtract place values from the left: for 168, 128 fits (remainder 40), 64 does not, 32 fits (remainder 8), 16 does not, 8 fits (remainder 0). That gives 10101000.

How does this help with subnetting?

A mask is just a run of 1s. Writing the address and mask in binary and comparing them bit by bit shows exactly which bits form the network address. The subnetting guide uses this method.