IP to Hex Converter (and Hex to IP)

Convert IP addresses to hex and hex back to IP, including little-endian values from Linux /proc/net.

The direction is detected from what you paste. One per line for many; results update as you type.

Result

192.168.1.1 →

C0A80101

HexC0A80101
With 0x0xC0A80101
Dotted hexC0.A8.01.01
Little-endian (e.g. /proc/net/tcp)0101A8C0

How it's calculated

  1. 192 = 12 × 16 + 0 → C0
  2. 168 = 10 × 16 + 8 → A8
  3. 1 = 0 × 16 + 1 → 01
  4. 1 = 0 × 16 + 1 → 01

How to Convert an IP Address to Hexadecimal

To convert an IP address to hex, write each octet in base 16: 192.168.1.1 becomes C0.A8.01.01, or C0A80101. Paste hex to convert it back; little-endian forms (as in Linux /proc/net) are supported. IPv6 addresses give their 32-digit hex value.

Convert each of the four numbers to two hex digits and join them: 192 → C0, 168 → A8, 1 → 01, 1 → 01. To convert one number, divide it by 16: the result is the first digit and the remainder the second, where 10 to 15 are written A to F.

OctetDivide by 16Hex
19212 remainder 0C0
16810 remainder 8A8
10 remainder 101
10 remainder 101

The result is written C0A80101, 0xC0A80101 in code, or C0.A8.01.01 as dotted hex. Hex IPs appear in packet captures, memory dumps, MAC-style tables and database columns.

How to Convert Hex Back to an IP Address

Split the 8 hex digits into pairs and convert each pair to decimal: C0A80101 → 192.168.1.1.

Each pair is first digit × 16 + second digit: C0 = 12 × 16 + 0 = 192. The converter accepts C0A80101, 0xC0A80101, c0.a8.1.1 and 32-digit IPv6 values; shorter values are padded with zeros on the left, and the result says so.

Little-Endian Hex (Linux /proc/net, Windows)

Some systems store the bytes reversed: 0101A8C0 is 192.168.1.1. Use the toggle.

x86 processors store numbers with the lowest byte first ("little-endian"), and some tools print that memory order. The common case is Linux /proc/net/tcp, where a connection to 127.0.0.1 port 80 appears as 0100007F:0050: the address is reversed, the port isn't. Paste such an entry as it is and the converter reads both parts. For /proc/net/tcp6, each block of 8 hex digits is reversed on its own; the little-endian option handles that too.

IPv6 in Hex

IPv6 is already hex: the tool shows the full 32-digit value without colons, useful for databases.

2001:db8::1 becomes 20010DB8000000000000000000000001: the eight groups written out with four digits each, colons removed. Store it in a BINARY(16) column or compare values as fixed-width strings. To see the groups with colons, use the IPv6 expander.

How This Tool Works

ItemDetail
Where it runsIn your browser; nothing is sent to our server.
Input checksStrict: each IPv4 number 0-255 in decimal, IPv6 in any standard form (including ::ffff:192.0.2.1 and zones). Invalid input gets the reason, never a silent guess.
Many at onceOne value per line, up to 1,000 lines; each line is converted on its own.
Shareable link?q= followed by a value opens the page with it converted.
StoredNothing.
Last verified10 November 2026

Frequently Asked Questions

How do I convert an IP address to hex?
Convert each octet to two hex digits: 192.168.1.1 → C0 A8 01 01 → C0A80101.
How do I convert hex to an IP address?
Split it into pairs and convert each pair to decimal: C0A80101 → C0, A8, 01, 01 → 192.168.1.1. Paste it above to do it automatically.
Why does Linux show IP addresses in reversed hex?
Files like /proc/net/tcp store addresses in little-endian byte order, so 127.0.0.1 appears as 0100007F. Turn on the little-endian option, or paste the whole IP:port entry.

Next steps

Related Tools

IP to Binary Converter
An IP address in binary, bit by bit, and back.
IP to Decimal
An IP address as a single number, and back.
IPv6 Expander
Write any IPv6 address out in full.

Related Guides

Guide What Is IPv4?
how a 32-bit address is built.