IP to Hex Converter (and Hex to IP) |
The direction is detected from what you paste. One per line for many; results update as you type.
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.
| Octet | Divide by 16 | Hex |
|---|---|---|
| 192 | 12 remainder 0 | C0 |
| 168 | 10 remainder 8 | A8 |
| 1 | 0 remainder 1 | 01 |
| 1 | 0 remainder 1 | 01 |
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
| Item | Detail |
|---|---|
| Where it runs | In your browser; nothing is sent to our server. |
| Input checks | Strict: 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 once | One 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. |
| Stored | Nothing. |
| Last verified | 10 November 2026 |
Frequently Asked Questions
How do I convert an IP address to hex?
How do I convert hex to an IP address?
Why does Linux show IP addresses in reversed hex?
Next steps