IP to Hex Converter
Turn IP addresses into their hexadecimal form, one address per line, for IPv4 and IPv6.
Processed locally in your browser· Your data stays in your browser.
What is IP to Hex Converter?
An IPv4 address is a 32-bit number, so it is exactly 8 hexadecimal digits: each dotted octet becomes two digits, and 192.168.1.1 is C0 A8 01 01, or 0xC0A80101. An IPv6 address is a 128-bit number, so it is 32 hex digits, which is what you see in the expanded form 2001:0db8:0000:… without the colons.
This converter reads every line, strictly validates it as IPv4 or IPv6, and prints the hex value. You choose the 0x prefix, uppercase or lowercase, and a separator between octets (IPv4) or 16-bit groups (IPv6). For a single address it also shows the decimal value and the address type; for a list it fills a table.
How does it work?
- Paste one IPv4 or IPv6 address per line; IPv4 and IPv6 can be mixed.
- Choose whether to keep the 0x prefix and uppercase letters.
- Pick a separator if you want the octets or groups split, for example C0:A8:01:01.
- Copy the result, or turn on “input = result” to keep each address next to its hex value.
Common use cases
- Reading an address in a packet capture or hex dump and matching it with its dotted form.
- Writing IP constants such as 0x7F000001 in C, Go or assembly code.
- Building firewall or BPF filter values that expect a hexadecimal address.
- Checking how an IPv6 address expands to 32 digits.
Examples
Try this input in the tool above:
192.168.1.1 10.0.0.255 2001:db8::1
0xC0A80101 0x0A0000FF 0x20010DB8000000000000000000000001
Privacy
IP to Hex Converter runs entirely in your browser. The text or files you provide are processed on your device and are not uploaded, logged or stored on our servers.
Limitations
The hex value is the address in network byte order (big-endian). Some tools and CPUs display it byte-swapped, so C0A80101 may appear as 0101A8C0 elsewhere.
Frequently asked questions
How many hex digits does an IP address have?
IPv4 always gives 8 digits (32 bits) and IPv6 always gives 32 digits (128 bits). Leading zeros are kept, so 10.0.0.1 is 0A000001 and not A000001.
Why do my hex digits look reversed in a debugger?
On little-endian machines a 32-bit value is stored with the lowest byte first, so memory shows 01 01 A8 C0 for 192.168.1.1. This tool always writes the network order, most significant octet first.
Does it accept an IPv6 address with a zone or brackets?
Yes. A %zone suffix and [brackets] are accepted and ignored. A /prefix is rejected because a prefix length is not part of an address.
Related tools
Hex to IP Converter
Decode hexadecimal values, in the forms you find in dumps and code, back to IPv4 or IPv6 addresses.
Network Tools
IP to Decimal Converter
Get the integer behind an IP address, in decimal or hex, for one address or a whole list.
Network Tools
IP to Binary Converter
See any IP address as bits, for example 192.168.1.1 → 11000000.10101000.00000001.00000001.
Network Tools
Decimal to IP Converter
Turn a decimal, 0x hexadecimal or 0b binary integer into the IPv4 or IPv6 address it represents.
Network Tools
IPv4 Address Validator
Paste one or many IPv4 addresses to see whether each is valid, why not if it is not, and what kind of address it is.
Network Tools
IPv6 Address Validator
Check an IPv6 address, then see its canonical short form, its full 32-digit form and what kind of address it is.
Network Tools
Decimal to Hex Converter
Turn decimal integers into hexadecimal, with byte grouping, a 0x prefix and fixed-width two’s complement for negative values.
Developer Tools
Text to Hex Converter
See the exact bytes behind any text, from a quick "Hello" to emoji, formatted the way your code or debugger expects.
Encoding & Decoding