💻 IP to Hex Converter
Convert IPv4 and IPv6 addresses to hexadecimal, binary, decimal and more — with full octet-by-octet breakdown
| IP Address | Hex (0x Prefix) | Hex (Dotted) | Purpose |
|---|---|---|---|
| 192.168.1.1 | 0xC0A80101 | C0.A8.01.01 | Home Router Default Gateway |
| 192.168.0.1 | 0xC0A80001 | C0.A8.00.01 | Alternate Home Router |
| 10.0.0.1 | 0x0A000001 | 0A.00.00.01 | Private Class A Gateway |
| 172.16.0.1 | 0xAC100001 | AC.10.00.01 | Private Class B Gateway |
| 255.255.255.0 | 0xFFFFFF00 | FF.FF.FF.00 | Subnet Mask /24 |
| 255.255.255.255 | 0xFFFFFFFF | FF.FF.FF.FF | Broadcast (All Hosts) |
| 0.0.0.0 | 0x00000000 | 00.00.00.00 | Wildcard / Default Route |
| 127.0.0.1 | 0x7F000001 | 7F.00.00.01 | Localhost / Loopback |
| 8.8.8.8 | 0x08080808 | 08.08.08.08 | Google Public DNS |
| 1.1.1.1 | 0x01010101 | 01.01.01.01 | Cloudflare DNS |
| CIDR | Decimal Mask | Hex Mask | Usable Hosts |
|---|---|---|---|
| /8 | 255.0.0.0 | 0xFF000000 | 16,777,214 |
| /16 | 255.255.0.0 | 0xFFFF0000 | 65,534 |
| /24 | 255.255.255.0 | 0xFFFFFF00 | 254 |
| /25 | 255.255.255.128 | 0xFFFFFF80 | 126 |
| /26 | 255.255.255.192 | 0xFFFFFFC0 | 62 |
| /27 | 255.255.255.224 | 0xFFFFFFE0 | 30 |
| /28 | 255.255.255.240 | 0xFFFFFFF0 | 14 |
| /30 | 255.255.255.252 | 0xFFFFFFFC | 2 |
| /32 | 255.255.255.255 | 0xFFFFFFFF | 1 (Host Route) |
| Class | Range (Decimal) | Hex Start | Hex End |
|---|---|---|---|
| Class A | 1.0.0.0 – 126.255.255.255 | 0x01000000 | 0x7EFFFFFF |
| Class A Private | 10.0.0.0 – 10.255.255.255 | 0x0A000000 | 0x0AFFFFFF |
| Class B | 128.0.0.0 – 191.255.255.255 | 0x80000000 | 0xBFFFFFFF |
| Class B Private | 172.16.0.0 – 172.31.255.255 | 0xAC100000 | 0xAC1FFFFF |
| Class C | 192.0.0.0 – 223.255.255.255 | 0xC0000000 | 0xDFFFFFFF |
| Class C Private | 192.168.0.0 – 192.168.255.255 | 0xC0A80000 | 0xC0A8FFFF |
| Loopback | 127.0.0.0 – 127.255.255.255 | 0x7F000000 | 0x7FFFFFFF |
| Multicast | 224.0.0.0 – 239.255.255.255 | 0xE0000000 | 0xEFFFFFFF |
| Hex Digit | Decimal | Binary (4-bit) | Note |
|---|---|---|---|
| 0 | 0 | 0000 | Zero nibble |
| 1 – 9 | 1 – 9 | 0001 – 1001 | Same as decimal |
| A | 10 | 1010 | First letter digit |
| B | 11 | 1011 | |
| C | 12 | 1100 | |
| D | 13 | 1101 | |
| E | 14 | 1110 | |
| F | 15 | 1111 | Max nibble value |
| FF | 255 | 11111111 | Max octet (8-bit) |
| 0x prefix | N/A | N/A | Denotes hex notation |
Convert IP address to Hex form is surprisingly easy, when one understands the process. For instance, 192.168.1.1 turns to C0A80101 in Hex. Yes it seems weird at first sight, but everything clears up, if one divides it part by part.
Here the basic idea: split your IP address in four separate parts. Each of those one calls an octet. Later, one converts every octet from decimal to two-digit Hex value.
How to Convert an IP Address to Hex
When the Hex result has only one figure, one adds a zero before it, so that everything stays at two signs. Then, one ties all four Hex values in one string with eight characters.
Allow me show it with 192.168.1.1. We start with 192: share it by 16, and one receives 12 with remainder 0, so C0 in Hex. Then comes 168.
Sharing by 16, gives 10 and 8, what becomes A8. Later the 1: because it is under 16, simply add a zero in fornt, making 01. Tie everything, and done: C0A80101.
Free online converters do all this trouble for you for free. Simply enter your IP address in the field, click the button, and get the Hex match almost right away. No cost, no limit, nothing stops you.
Many of those tools go even further: they also give conversions too decimal, binary or octal, if you need it in other form.
The most handy tools work both ways. You can enter a Hex IP and receive the usual dot separated decimal format back. Some converters accept Hex IP with dots, like 7f.00.00.01, while others prefer it as one long sequence, for instance 0x7f000001.
Either way, good tools handle both.
Here something notable: every number between those dots shows one byte. That byte ranges between 0 and 255 in decimal, or between 00 and FF in Hex thinking. Actually, some say, that forms like C0:A8:00:01, the Hex version of 192.168.0.1; stay better in the mind than the decimal form.
It is simply preference, at the end of the day.
One could write an IP address as whole binary, only a long chain of ones and zeros. Or even as one huge decimal number. But Hex hits that nice middle point, because it is shorter than binary, but still very useful for programming and network tasks.
In Python one can handle such conversions easily, with built-in functions, that split the IP, change every part, and later tie everything. It helps web builders andprogrammers, that find it surprisingly handy.



