You don't have javascript enabled. Please enable javascript to use this website.

IP to Hex Converter

Convert any IPv4 or IPv6 address to its hexadecimal representation — single address or bulk list, entirely in the browser.
IP Address:
Convert Now Clear
More Tools

What Is IP to Hex Conversion?

IP to hex conversion maps a dotted-decimal IPv4 address to its hexadecimal (base-16) equivalent. Each of the four decimal octets (0–255) converts independently to a two-digit hex value, then concatenates: 192.168.1.1 becomes C0A80101 (C0 = 192, A8 = 168, 01 = 1, 01 = 1). IPv6 addresses are natively hexadecimal by specification (RFC 4291); this tool also expands compressed notation and strips colon separators, producing a continuous 32-digit hex string. Hexadecimal IP representations appear in firewall ACLs, packet captures, programming environments, and network logging systems that store addresses as integer or hex values.

Input IP Hex Output Octet Breakdown
192.168.1.1 C0A80101 C0 · A8 · 01 · 01
8.8.8.8 08080808 08 · 08 · 08 · 08
10.0.0.1 0A000001 0A · 00 · 00 · 01
127.0.0.1 7F000001 7F · 00 · 00 · 01
255.255.255.255 FFFFFFFF FF · FF · FF · FF

Bulk IP to Hex Conversion

The tool includes a bulk conversion mode — paste a list of IPv4 or IPv6 addresses, one per line, and convert all of them in a single operation. No file upload is required. All processing runs in the browser: the full list is converted instantly, and no address is transmitted to any server. Bulk mode is useful for processing firewall rule sets, converting network log exports, or preparing address lists for programming test fixtures.


Enter Your IP Address

Click the Convert to Hex button. Conversion runs instantly in the browser — no server request is made and no data is transmitted.

1

Read the IPv4 Result

For IPv4 input, the output is four two-digit hex pairs concatenated — for example, 192.168.1.1 produces C0A80101, where C0=192, A8=168, 01=1, 01=1.
2

Read the IPv6 Result

For IPv6 input, the tool expands any compressed notation (such as ::) and produces the full 32-digit hexadecimal string representing the 128-bit address.
3

Copy and Use the Hex Value

Copy the hexadecimal result for use in a firewall ACL, Wireshark filter, code variable, or any system that requires IP addresses in hex notation.

How IP to Hex Conversion Works

IPv4 addresses (RFC 791) are 32-bit unsigned integers expressed as four decimal octets. Each octet occupies 8 bits and has a range of 0–255. To convert to hexadecimal, each octet is divided by 16: the quotient becomes the first hex digit, the remainder the second. Values 10–15 map to letters A–F. A leading zero is always applied when the value is below 16 (e.g., 1 → 01), ensuring every octet always produces exactly two hex digits. The four hex pairs are then concatenated into an 8-character string.

IPv6 addresses (RFC 4291) are 128-bit values defined in hexadecimal — eight groups of four hex digits separated by colons. Compressed notation (::) represents one or more consecutive groups of all-zero bits. This tool expands compressed notation and pads each group to four digits before stripping colons, producing a continuous 32-character hex string representing the full 128-bit address.

IPv4 Hex Output Formats — Reference

Format Example (192.168.1.1) Common Use
Continuous C0A80101 Firewall ACLs, database storage, packet analysis
Dotted C0.A8.01.01 Human-readable; maps directly back to IP octets
0x Prefixed 0xC0A80101 C, C++, Go, Rust source code; hex editors
Windows ping 0xc0a80101 ping 0xc0a80101 on Windows CMD resolves to 192.168.1.1

Common Uses for IP to Hex Conversion

Packet capture analysis. A security analyst reviewing a Wireshark capture sees source address 0xc0a80101 in a raw frame. Entering that value confirms the address is 192.168.1.1 — a private LAN host (RFC 1918), not an external actor. Hexadecimal is the native format of the IPv4 header as defined in RFC 791, making this conversion essential for manual frame inspection.

Firewall and ACL configuration. A network engineer configuring a legacy Cisco ACL or firewall rule set that requires hex IP notation pastes ten addresses into bulk mode. The full output column is copied directly into the configuration — no manual per-address conversion and no conversion script needed.

Network programming and testing. A developer writing a Go network library stores incoming IP addresses as 32-bit integers in a Redis cache, keyed by their hex representation. Bulk mode converts an entire test fixture list in one pass, producing the hex strings needed for unit test assertions without writing a throwaway conversion utility.


Frequently Asked Questions

What does 192.168.1.1 convert to in hexadecimal?
Each of the four decimal octets (192, 168, 1, 1) converts independently to a two-digit hex value: 192 → C0, 168 → A8, 1 → 01, 1 → 01. Concatenated, the result is C0A80101. In programming notation with the 0x prefix, this is written as 0xC0A80101. The conversion is deterministic — the same input always produces the same output.
How does the tool convert IPv6 addresses to hex?
IPv6 addresses are defined in hexadecimal by RFC 4291 — eight groups of four hex digits, separated by colons. This tool expands any compressed notation (::) to restore the full eight-group form, then strips colon separators to produce a continuous 32-digit hex string representing the full 128-bit address — for example, 2001:db8::1 becomes 20010db8000000000000000000000001.
What is the difference between continuous hex, dotted hex, and the 0x prefix format?
Continuous hex (C0A80101) removes all separators and produces the compact 8-character string used in firewall ACLs, database storage, and packet analysis. Dotted hex (C0.A8.01.01) preserves a separator between each octet's pair, making it easy to map back to the original IP address. The 0x prefix form (0xC0A80101) is the standard programming notation used in C, Go, Rust, and shell environments, and is accepted by Windows ping directly.
How accurate is IP to hex conversion?
IP to hex conversion is a deterministic base-16 arithmetic operation with no approximation. Each octet (0–255) maps to exactly one two-digit hex value (00–FF) — the result is always correct for any valid IPv4 address. For IPv6, the tool validates the address format before expanding and converting, returning an error for malformed input rather than a silent incorrect result.
Why is my IPv6 hex output longer than I expected?
IPv6 uses compressed notation (::) to suppress consecutive groups of all-zero bits, making the address appear shorter. When expanded to the full 128-bit representation, each suppressed group is restored as 0000. For example, 2001:db8::1 expands to 2001:0db8:0000:0000:0000:0000:0000:0001, which produces a 32-digit hex string when colons are stripped. This is the correct unabbreviated representation.
Do you store or log the IP addresses I enter?
No data is transmitted to any server. All conversion runs entirely in the browser using JavaScript. No IP address, result, or session data entered into this tool is logged, stored, or shared.

Related Guides

Guide What Is IPv4? — Addressing, Structure, and Binary Encoding
understand how the 32-bit IPv4 address is structured into four octets and why hexadecimal is the natural low-level representation for network layer operations.
Guide What Is IPv6? — 128-Bit Addressing and Hexadecimal Notation
explore how IPv6 uses hexadecimal natively, how compressed notation (::) works, and what the 32-digit hex form of an IPv6 address represents.