araç köşesi

IP Address to Binary, Hex and Decimal

Convert an IPv4 address to binary, hex and a single decimal number and back; add /24 to also get the subnet mask and network address

Your data stays with you. Conversion happens inside the browser; nothing is sent to a server.

How it works

Type one IPv4 address per line into the left pane; the conversion appears on the right straight away. The input format is detected for you: dotted notation such as 192.168.1.1, dotted binary such as 11000000.10101000.00000001.00000001, 32-digit binary without dots, hex such as C0A80101 or 0xC0A80101, and a single number such as 3232235777. For example, 192.168.1.1, the admin address of many home routers, is 11000000.10101000.00000001.00000001 in binary, C0A80101 in hex and 3232235777 as a single number. Add a prefix such as /24 and you also get the subnet mask (255.255.255.0), the network address (192.168.1.0), the broadcast address (192.168.1.255) and the number of addresses in that network (256). An 8-character input made only of digits is read as decimal; to enter hex, start it with 0x. A broken line, for example one containing 256, is shown in the result with the reason, and the other lines are still converted.

This tool is also known as ip to binary, ip to binary converter, ip to hex converter, binary to ip, ip to decimal, subnet mask calculator.

What is IPv4 address?

An IPv4 address is the 32-bit address of a device on the internet or a local network. For readability it is written as four numbers separated by dots, each between 0 and 255. The ranges 192.168.x.x, 10.x.x.x and 172.16–31.x.x are private addresses used in homes and offices; they are not directly visible on the internet. 32 bits give about 4.3 billion addresses in total, which ran short and led to IPv6.

What is Subnet mask?

A subnet mask is a 32-bit value that decides which bits of an IP address identify the network and which identify the device on it. It is an unbroken run of 1s from the left followed by 0s, and the number of 1s is written in short as a CIDR prefix such as /24. The most common mask on home networks is 255.255.255.0 (/24): 254 device addresses are usable, because the first address stands for the network itself and the last for broadcast.

What is the difference between binary and decimal IP notation?

Both show the same 32-bit value; only the reader differs. Dotted decimal (192.168.1.1) is short for people, and settings screens and router pages use it. Binary (11000000.10101000.00000001.00000001) shows every bit; you need it to see, together with the subnet mask, which bits belong to the network and to work out subnets. The single decimal number (3232235777) is how programs often store an address so they can compare and sort it quickly.

Why an IP address is both four numbers and 32 bits

An IPv4 address is really a single 32-bit number. To make it readable, the number is split into four 8-bit parts (octets), and each part is written in decimal from 0 to 255: that is how 192.168.1.1 comes about. That is also why no part can be 256; 8 bits hold at most 255. The same address can be written as one number: 192 × 16777216 + 168 × 65536 + 1 × 256 + 1 = 3232235777.

Binary matters because subnetting is done in binary. The /24 prefix means the first 24 bits of the mask are 1: 11111111.11111111.11111111.00000000, which is 255.255.255.0. A bitwise AND of address and mask gives the network address; setting the mask's 0 bits to 1 gives the broadcast address.

  • 192.168.1.1 → 11000000.10101000.00000001.00000001
  • 10.0.0.0/8 → mask 255.0.0.0, broadcast 10.255.255.255
  • 256.1.1.1 → error: an octet can be at most 255

When you need which format

Networking courses and certification exams (CompTIA Network+, CCNA) expect subnetting in binary; only there do you see which bits belong to the network and which to the host. Firewall rules, some databases and log files store an address as a single 32-bit number; the reverse conversion tells you which address a value like 3232235777 in a log refers to.

Hex shows up in packet analysers and some configuration files. Limit: this version converts IPv4 only; IPv6 addresses such as fe80::1 are recognised but not converted, and the result says so.

Frequently asked questions

How do I convert an IP address to binary?

Convert each of the four parts separately to 8-bit binary and pad it to 8 digits with zeros: 192 = 11000000, 168 = 10101000, 1 = 00000001. Join the parts with dots again. Type the address into the left pane and the tool does this for you.

What does /24 mean, and how do I find the subnet mask?

/24 says the first 24 bits of the mask are 1; that is the mask 255.255.255.0, and the network has 256 addresses (the first is the network address, the last the broadcast address). Write the address as 192.168.1.0/24 and the tool calculates the mask, network address and broadcast address.

Which IP address is a number like 3232235777?

Type the number into the left pane; the tool reads it as a 32-bit integer and converts it to dotted form: 3232235777 = 192.168.1.1. Log files and some databases store addresses this way.

Are the addresses I type sent anywhere?

No. The conversion runs entirely in your browser; internal network or server addresses you type are never sent anywhere.