FormatterHQ

IP to Hex Converter

Turn a dotted IPv4 address into 8-digit hexadecimal as you type. The result shows the 0x value and the dotted hex bytes.

Loading tool…
Ready.

How to use the IP to Hex Converter

  1. Type or paste an IPv4 address in dotted-decimal form into the address field.
  2. The results update as you type. The address is checked for four octets between 0 and 255.
  3. Read the Hexadecimal row for the 32-bit value with a 0x prefix and the Dotted hex row for the separate bytes.
  4. Use the copy button on a row to take the value into your config file, script or packet notes.

IP to hex: IPv4 addresses in base 16

An IPv4 address is a single 32-bit number, and converting IP to hex simply writes that number in base 16. Because every octet is one byte, each octet becomes exactly two hex digits, so any address fits in eight digits. This converter prints both the combined value and the byte-by-byte form, for example 192.168.1.1 → 0xC0A80101 (C0.A8.01.01).

How the conversion works

Convert each octet on its own, pad it to two digits, then join the four pairs in their original order:

OctetDecimalMathHex
1st19212 × 16 + 0C0
2nd16810 × 16 + 8A8
3rd10 × 16 + 101
4th10 × 16 + 101

The padding is not cosmetic. 10.0.0.254 is 0x0A0000FE; if you drop the leading zero of each byte you get A00FE, which is a completely different number.

192.168.1.1    →  0xC0A80101  (C0.A8.01.01)
10.0.0.254     →  0x0A0000FE  (0A.00.00.FE)
8.8.8.8        →  0x08080808  (08.08.08.08)
172.16.254.1   →  0xAC10FE01  (AC.10.FE.01)

Where hexadecimal IP addresses appear

  • Packet dumps. The source and destination fields of an IPv4 header are four raw bytes, so a hex dump of a packet sent to 8.8.8.8 contains 08 08 08 08.
  • PXE network boot. PXELINUX searches for a configuration file named after the client address in uppercase hex, so a machine at 192.168.1.1 asks for C0A80101.
  • Kernel tables. Linux files such as /proc/net/route list addresses as eight hex digits.
  • Debuggers. A struct in_addr holds the address as a 32-bit integer, which a debugger often prints in hex.

Byte order: the most common surprise

This converter writes the bytes in network byte order (big-endian): the first octet is the most significant byte, exactly as the address travels on the wire. Many tools print the same four bytes in the host order of an x86 CPU, which is little-endian. In /proc/net/route, the network 192.168.1.0 shows up as 0001A8C0, the reverse of C0A80100.

If a value from a log does not match what you expect, swap the byte order with the Reverse Hex tool and compare again. To go the other way, paste the hex into Hex to IP; for the plain integer form, use IP to Decimal.

Validation and privacy

The address must contain exactly four decimal octets from 0 to 255. Inputs such as 256.1.1.1 or the shorthand 192.168.1 are marked as invalid, with an error that quotes the offending value. Hex digits are printed in uppercase, but hex is case-insensitive, so 0xc0a80101 means the same thing. The conversion runs entirely in your browser; the addresses you enter are not sent to our server.

Frequently asked questions

What is 192.168.1.1 in hex?
It is 0xC0A80101. The octets 192, 168, 1 and 1 become the bytes C0, A8, 01 and 01, written in that order.
Why does the hex IP in my log look reversed?
The program probably printed the 32-bit value in little-endian host order, as x86 machines store it. Reverse the four bytes (for example 0001A8C0 becomes C0A80100) and then convert.
Can I type a hex IP address into a browser?
Browsers that follow the WHATWG URL standard accept a single hex number as an IPv4 host, so http://0xC0A80101/ opens 192.168.1.1. It is rarely useful in practice, but it explains why security filters must normalize addresses before comparing them.
Does this convert IPv6 addresses to hex?
IPv6 addresses are already written in hexadecimal groups, so there is nothing to convert. If you type one, the page shows an IPv6 panel with the fully expanded form, the 128 bits and the decimal value, the same details as the IPv6 to Binary converter.
Can I convert a whole list at once?
No. The page works on one address at a time and updates as you type, showing its hex, decimal, binary and octal forms together. Paste the next address into the field to convert it.

Last updated October 3, 2026

Related tools