IP to Binary Converter
CV-23Paste IPv4 addresses such as 192.168.1.1 to see them in binary, decimal, hex or octal, one per line. The reverse button turns those forms back into dotted addresses.
Runs in your browser. Nothing is uploaded.
IPv4 addresses, or values to turn back into addresses (one per line)
Result
How to use it
- Paste one IPv4 address per line, or the binary, decimal, hex or octal values you want to turn back.
- Pick the form in the Form menu: dotted binary, 32 binary digits, decimal, hex or octal.
- Click IP to number form, or Number form to IP when you are converting the other way. The Form menu then says how your input is written.
- Tick Show the input beside each result if you want to keep track of which line is which.
- Copy the result or download it as a text file.
What each form looks like
For 192.168.1.1 the page gives dotted binary 11000000.10101000.00000001.00000001, the same 32 digits without dots, the decimal value 3232235777, hex 0xC0A80101 and octal 0o30052000401. Hex is padded to 8 digits and octal to 11. All forms describe the same 32-bit number, with the first of the four numbers as the highest byte.
Strict address checking
An address must have exactly four numbers from 0 to 255 separated by dots. The page rejects shortcuts such as 192.168.1, and it rejects numbers with a leading zero such as 010, because some systems read that as octal and others as decimal. Fix the input rather than getting a different address than you expected. IPv6 addresses, ports and CIDR prefixes are not accepted.
Going back to an address
In the reverse direction, binary input must be four groups of exactly 8 digits or 32 digits in a row. Decimal must be from 0 to 4294967295. Hex takes up to 8 digits with or without 0x, and octal takes up to 11 digits with or without 0o. Anything outside those limits is reported instead of being cut short.
Error messages and what to do
| Message | What it means | Fix |
|---|---|---|
Octet 256 in "256.1.1.1" is above 255. | One of the four numbers is larger than 255. | Use values from 0 to 255 in each position. |
"192.168.1" is not an IPv4 address. Expected 4 numbers separated by dots, such as 192.168.1.1. | The address has fewer or more than 4 parts. | Write all four numbers, for example 192.168.1.0. |
Octet "010" in "10.010.0.1" has a leading zero, which some systems read as octal. Remove the zero. | A number starts with 0 and has more than one digit. | Write 10 instead of 010. |
Questions people ask
How do I convert an IP address to binary?
Turn each of the four numbers into 8 binary digits. For 192.168.1.1 that gives 11000000.10101000.00000001.00000001. Paste the address into the box with Form set to dotted binary and the page does it for you.
What is 192.168.1.1 in decimal and hex?
The 32-bit integer is 3232235777, and in hex it is 0xC0A80101. Pick Decimal or Hex in the Form menu to see them. The conversion treats the first number as the most significant byte.
How do I convert binary back to an IP address?
Click Number form to IP and keep Form on dotted binary. Paste four groups of 8 digits such as 11000000.10101000.00000001.00000001 and you get 192.168.1.1. For 32 digits in one string, choose the 32 digits form.
Why are leading zeros rejected in an IP address?
Some systems read a number with a leading zero as octal, so 010 can mean 8 rather than 10. To avoid giving you a quietly different address, the page asks you to remove the zero.
Does it work with IPv6?
No. This page is for IPv4 only. For IPv6, use the IPv6 expander and compressor page, which handles the 8 group format and the :: short form.
About this tool
IPv4 only, one address per line. An address must have four numbers from 0 to 255 separated by dots. Numbers with a leading zero (such as 010) are rejected because some systems read them as octal. Output forms are dotted binary (8 digits per number), 32 binary digits, the decimal value of the 32-bit integer, hex padded to 8 digits with a 0x prefix, and octal padded to 11 digits with a 0o prefix. Going back, the Form option says how your input is written; binary input must be exactly 8 digits per group or 32 digits in all. Hex and octal accept the prefix or not. IPv6, ports and CIDR prefixes are not accepted here.