IPv4 Address Representation Converter
Inputs
| IPv4 address | 192.168.1.1 |
|---|
IPv4 Address Representation Converter
Enter a dotted-decimal IPv4 address to see it as a 32-bit integer, a hexadecimal value, and dotted binary. Useful for reading packet captures, building access lists, and understanding how addresses are stored.
Inputs
IPv4 Address
Results
Enter a value to see results.
Representations
IPv4 Address Representation
An IPv4 address is, underneath the familiar dotted-decimal notation, just a single 32-bit number. This calculator takes an address such as 192.168.1.1 and shows the same value in four representations at once: dotted-decimal, a plain integer, hexadecimal, and dotted binary. Each form is exact and lossless — they are the same bits regrouped for a different reader. Network engineers reach for these conversions when reading packet captures, writing access-control lists, storing addresses in a database, or reasoning about where a subnet boundary falls.
Dotted-decimal: the human-friendly form
The notation everyone recognizes splits the 32 bits into four 8-bit groups called octets, writes each octet as a decimal number from 0 to 255, and joins them with dots. The address 192.168.1.1 has octets 192, 168, 1, and 1. The dots are purely a convenience for people; the hardware never sees them, only the underlying bits. Because each octet holds 8 bits, its value can range from 0 (all bits zero) to 255 (all bits one), which is why an octet larger than 255 is not a valid address.
The integer form
Treat the four octets as digits of a base-256 number, with the leftmost octet being the most significant:
The result is always a single unsigned integer between 0 and . This form is what makes range checks cheap: asking whether an address falls inside a block becomes a pair of integer comparisons, which is far faster than parsing dotted strings. Many databases and log pipelines store addresses this way for exactly that reason.
Hexadecimal and binary
Hexadecimal expresses the same integer in base 16 with a 0x prefix. Because two hexadecimal digits encode exactly one octet, the mapping is tidy: each octet becomes a fixed two-character group. Hexadecimal is what packet analyzers and low-level network code display.
The binary form writes out all 32 bits, grouped into the same four octets. This is the representation that subnet masks and CIDR prefixes actually operate on. A prefix length such as /24 means the first 24 bits identify the network and the last 8 identify the host — a boundary you can only see clearly once the address is spelled out bit by bit.
Worked example
Take 192.168.1.1. Converting each octet to 8-bit binary gives:
19216811=11000000=10101000=00000001=00000001Joining the octets with dots yields the binary form 11000000.10101000.00000001.00000001. Collapsing the bits into a single integer:
In base 16 that integer is 0xC0A80101 — and you can read it straight off the binary, since each octet (192, 168, 1, 1) maps to the hex pairs C0, A8, 01, 01. All four representations describe one address; only the grouping changes.
Related calculators
To split an address into its network and host portions with a CIDR prefix, see the Subnet (CIDR) Calculator. To convert arbitrary numbers between decimal, binary, and hexadecimal beyond the IPv4 context, the Number Base Converter handles the underlying base arithmetic.
Frequently Asked Questions (FAQ)
Why convert an IPv4 address to other forms?
The dotted-decimal form is easy for people to read, but computers, log files, and databases often store and compare addresses as plain integers because integer comparison is fast and a range check becomes simple arithmetic.
The binary form is what subnet masks and CIDR prefixes actually operate on, and the hexadecimal form is how addresses appear in packet headers and many debugging tools. Seeing all four side by side makes it clear that they are one number wearing different clothes.
What is dotted-decimal notation?
An IPv4 address is a 32-bit number. Dotted-decimal notation splits those 32 bits into four 8-bit groups called octets, writes each octet as a decimal number from 0 to 255, and joins them with dots, as in 192.168.1.1. It is purely a human-friendly way to write the bits; the dots carry no meaning to the hardware, which only sees the 32-bit value.
How is an address turned into a single integer?
Each octet is a digit in base 256, with the leftmost octet being the most significant. The integer is octet1 × 256³ + octet2 × 256² + octet3 × 256 + octet4. For 192.168.1.1 that is 192 × 16777216 + 168 × 65536 + 1 × 256 + 1 = 3232235777. The result is always between 0 and 4294967295, the full range of a 32-bit unsigned integer.
Where do the hexadecimal and binary forms show up?
Packet analyzers, low-level network code, and many router displays show addresses in hexadecimal because two hex digits map cleanly onto one octet. The binary form matters whenever you reason about subnets: a prefix length such as /24 means the first 24 bits identify the network, and you can only see those bit boundaries clearly when the address is written out in binary.