IP to Hex Converter

Convert IP addresses to hexadecimal format and back. Useful for network programming and low-level networking.

Helpful?
Enter IP Address
Enter an IPv4 address (e.g., 192.168.1.1)
Common IP Addresses
About IP to Hex Conversion

IP addresses are made up of 4 octets (bytes), each ranging from 0-255. Converting to hexadecimal represents each octet as a 2-digit hex value.

Example: 192.168.1.1 = C0.A8.01.01 = C0A80101
192 = C0 | 168 = A8 | 1 = 01 | 1 = 01

Conversion Results
Result
C0A80101
All Formats
IP Address 192.168.1.1
Hex (Dotted) C0.A8.01.01
Hex (Compact) C0A80101
Hex (0x Prefix) 0xC0A80101
Decimal (32-bit) 3232235777
Binary 11000000.10101000.00000001.00000001
Octet Breakdown
IP Address Info
Class
C
Type
Private
Range
192.168.x.x
Learn how it works: Hexadecimal Explained

This tool converts an IPv4 address to hexadecimal and back. Each of the four octets is a value from 0–255, which fits in exactly two hex digits, so a whole IP packs neatly into eight hex characters.

Worked example

Take 192.168.0.1 and convert each octet to hex:

  • 192 → C0
  • 168 → A8
  • 0 → 00
  • 1 → 01

Joined together that gives C0.A8.00.01 in dotted form, or 0xC0A80001 as a single packed 32-bit value — the representation you often see in low-level networking, firewall rules and packet dumps.

What about IPv6?

IPv6 addresses are already written in hexadecimal (eight groups of four hex digits), so they don't need this conversion. To work with raw bytes, see our guide to hexadecimal.

Frequently Asked Questions

Convert each of the four octets (0–255) to two hex digits, then join them. For example 192.168.0.1 becomes C0.A8.00.01, or 0xC0A80001 as one packed value.

It is 0xC0A80001 (C0=192, A8=168, 00=0, 01=1).

Hexadecimal is compact and maps directly to the bytes on the wire, so it shows up in packet captures, firewall and ACL rules, and low-level network code.

IPv6 is already expressed in hexadecimal, so it doesn't need converting. This tool focuses on turning IPv4 dotted-decimal addresses into hex.
Share this tool