Skip to content
Hex Calculator

IPv4 Hex Converter

Convert a dotted IPv4 address into its 8-digit hex form — a general-purpose IPv4-to-hex tool for configs, logs, and low-level networking code.

Hexadecimal value
0xC0A80101
Swapnil Sanghvi

Built by

Swapnil Sanghvi

Full-Stack Web Developer & WordPress Developer

Swapnil Sanghvi is a full-stack web and WordPress developer, UI designer, and full-time freelancer who builds and maintains Hex Calculator.

IPv4 Hex Converter tool preview card from Hex Calculator
Share preview: this is the card that appears when you share the IPv4 Hex Converter page on social media.

Further reading: IPv4 — Wikipedia

How IPv4-to-Hex Conversion Works

Each of the four dot-separated numbers in an IPv4 address is one byte (0-255). Converting to hex means converting each byte to its 2-digit hex form and joining them, left to right, in the same order they appeared in the dotted address.

Common Private-Network Addresses

IPv4 addressHexRange
10.0.0.10x0A00000110.0.0.0/8 private range
172.16.0.10xAC100001172.16.0.0/12 private range
192.168.1.10xC0A80101192.168.0.0/16 private range
127.0.0.10x7F000001loopback

Where This Actually Comes Up

Writing an Address Into a Hex-Based Config Field

Some embedded network stacks and configuration formats expect an IPv4 address as a single hex integer rather than dotted decimal.

192.168.1.1 -> 0xC0A80101

Searching a Hex-Encoded Log for a Known Address

When a log or packet trace shows addresses in hex, converting a known IPv4 address you're looking for into hex first makes it searchable as plain text.

search a log dump for C0A80101

Documenting a Private-Network Address Range

Converting the boundary addresses of a subnet to hex when writing firewall rules or documentation that references hex-formatted ranges.

10.0.0.0/8 range boundaries in hex

Why Use This Calculator Instead of Doing It by Hand

  • Validates every octet is 0-255 before converting, catching typos immediately
  • Always produces the full 8-digit hex form, with leading zeros preserved
  • Runs entirely in your browser — nothing you type gets sent anywhere
  • Accepts the standard dotted-decimal format you'd type anywhere else

Limitations

  • Produces big-endian output only — see the Hex Little Endian IP Converter for little-endian.
  • Supports IPv4 only — see Hex to IPv6 / IPv6 to Hex for the 128-bit address space.

Frequently Asked Questions

How do IPv4 addresses map to hex?

Each of the 4 decimal octets becomes a 2-digit hex byte, joined in order — 4 bytes always produce exactly 8 hex digits.

Is this the same as IP to Hex or IPv4 to Hex?

Yes — all three pages perform the identical conversion; this page is here for the "IPv4 hex converter" phrasing specifically.

What octet range is valid?

0-255 for each of the 4 octets — anything outside that range isn't a valid IPv4 address and is rejected.

Is the byte order always the same?

This converter outputs big-endian (most significant byte first) — the standard way IPv4 addresses are conventionally represented in hex.