Hex to IP Converter
Convert an 8-digit hex string to a dotted-decimal IPv4 address.
Quick examples
How hex-to-IP conversion works
IPv4 addresses are internally stored as a 32-bit value, which is naturally written as 8 hexadecimal digits (4 bits per digit × 8 = 32 bits). This tool splits those 8 hex digits into 4 bytes — 2 hex digits each — and converts every byte to its decimal equivalent to produce the familiar dotted-quad notation: C0A80101 → C0.A8.01.01 → 192.168.1.1.
You'll run into hex-encoded IPs when reading raw socket dumps, Windows registry DHCP lease values, or low-level network debugging output. Paste the value with or without a 0x prefix, and with or without ./: separators between byte pairs — this tool normalizes all of those automatically.
Need the reverse? Use the Decimal to IP Converter for uint32 values, or the IP to Decimal Converter to go from a dotted-quad address back to a number. For subnet math, see the IP Subnet Calculator.
Built and maintained by Meet Shah · Last updated
What this tool is used for
- Turning a hex value from a config file back into something you can recognise.
- Confirming a hex string is an address at all rather than an unrelated 32-bit value.
- Seeing the binary octets to work out which bits a subnet boundary falls on.
- Seeing the decimal and binary forms alongside the dotted quad.
- Converting an address stored as a hex string in a database.
Frequently Asked Questions
- Why is an IPv4 address exactly eight hex digits?
- Because it is 32 bits and each hex digit carries four. Every address therefore has a fixed-width hex form — 192.168.1.1 is C0A80101 — which is what makes hex convenient in packet dumps and kernel structures where alignment matters.
- Where does this form actually appear?
- In `/proc/net/tcp` on Linux, in packet captures, in some router configurations and in raw socket structures. Reading a connection table means converting hex back to dotted decimal, which is the case this tool exists for.
- What is the byte-order trap?
- Some sources store the address in host byte order rather than network order, so a little-endian machine writes the octets reversed — `0100A8C0` for 192.168.1.1. `/proc/net/tcp` does exactly this, which is why an address read from it can look nonsensical until it is byte-swapped.
- Can a hex string be shorter than eight digits?
- Leading zeros are often omitted, so `A8C0101` may mean `0A8C0101`. Padding to eight before splitting is essential — parsing an odd-length string into byte pairs shifts every octet and produces a completely different, entirely valid-looking address.
- Does a browser accept a hex address in a URL?
- Historically yes — `http://0xC0A80101/` resolved, along with octal and 32-bit decimal forms. That flexibility is the mechanism behind a family of SSRF filter bypasses, and modern URL parsing has tightened considerably, though not uniformly across every library.
Common errors and gotchas
- Getting the byte order wrong, which produces a valid-looking address for a different host.
- Reading a shorter hex string as an address by padding it, which changes the octets entirely.
- Treating the value as signed, which makes higher addresses appear negative.
- Confusing an address with a mask, which look identical in hex.
- Dropping a leading zero in the hex, which shifts every octet.