Format Code Now
/

Binary to IP Converter

CU-12

Paste a binary IPv4 address, either as four dotted octets or as one 32-digit number, and get the dotted decimal address. The second button goes the other way.

Runs in your browser. Nothing is uploaded.

Binary or IPv4 addresses (one per line)

Result

How to use it

  1. Paste one binary address per line, such as 11000000.10101000.00000001.00000001.
  2. Press Binary to IP to get dotted decimal addresses.
  3. To go back, paste dotted addresses and press IP to binary.
  4. Choose four dotted octets or one 32-bit number for the binary output.
  5. Copy the result or download it as a .txt file.

What the binary form of an address is

An IPv4 address is a 32-bit number. It is usually written as four decimal octets, but each octet is also eight binary digits, so 192.168.1.1 is 11000000.10101000.00000001.00000001. This tool reads either layout: four binary octets separated by dots or spaces, or all the digits as one number. Each octet must be 255 or less, and a single number must fit in 32 bits. Anything outside that range is reported with the value that broke the rule.

Scope and limits

The tool converts the notation and nothing else. It handles IPv4 only, with no IPv6 and no CIDR prefix, and it does not check whether an address is routable, in use or private. Decimal octets with a leading zero, such as 010, are rejected in the IP to binary direction because some systems read them as octal. Each line is converted on its own, and an error names the line that failed.

Error messages and what to do

MessageWhat it meansFix
Octet "100000000" in "100000000.0.0.0" is above 255 (in binary that is 11111111).One binary octet is larger than eight ones.Keep each binary octet to at most 8 digits with a value up to 11111111.
"1.1" has 2 parts. Write either one binary number or four binary octets separated by dots.The line has a number of dotted parts other than one or four.Give four octets, or write the whole address as one 32-digit number.

Questions people ask

How do I convert a binary number to an IP address?

Split the 32 bits into four groups of eight, convert each group to decimal, and join them with dots. 11000000 is 192, 10101000 is 168, 00000001 is 1. Paste the binary and press Binary to IP to do it for every line.

How do I convert an IP address to binary?

Convert each decimal octet to eight binary digits and keep the dots, so 10.0.0.255 becomes 00001010.00000000.00000000.11111111. Press IP to binary, and choose one 32-bit number in the options if you do not want the dots.

What binary formats does it accept?

Four binary octets separated by dots or spaces, or a single binary number of up to 32 digits. Octets may have fewer than eight digits, so 1.1.1.1 in binary is read as 1.1.1.1. A 0b prefix and underscores are accepted.

Why is my binary number rejected?

The usual causes are an octet above 11111111 (255), a single number longer than 32 bits, a digit other than 0 or 1, or a count of parts that is not one or four. The error text names which rule failed.

Does it work for IPv6?

No. It handles 32-bit IPv4 addresses only. An IPv6 address has 128 bits and a different layout, so a value of that kind is not accepted here and the tool reports an error.

About this tool

Reads each line as either four binary octets separated by dots (up to 8 digits each, for example 11000000.10101000.00000001.00000001) or one binary number of up to 32 digits, and writes the dotted IPv4 address. Every octet must be 255 or less; a value above that, or more than 32 bits, is an error. The second button writes an IPv4 address as four 8-digit binary octets, or as one 32-digit number. It handles IPv4 only, not IPv6, and it does not look an address up or check that it is in use. Addresses with leading zeros in a decimal octet are rejected because some systems read them as octal.

Format Code Now: free, no ads, no accounts. Your input stays in your browser.