How this instrument works
Every IPv4 address is really just one 32-bit number. Dotted-decimal notation — four numbers 0-255 separated by periods, like 192.168.1.1 — exists purely for human readability, splitting that single 32-bit value into four 8-bit chunks (octets) so it's easier to read and remember than a raw integer or a 32-character binary string. All three representations, decimal, binary, and hex, describe the exact same address; they're just different ways of writing the same 32 bits.
Converting between them is straightforward arithmetic. Each octet has a fixed place value based on its position: the first octet is worth 16,777,216 (2^24), the second 65,536 (2^16), the third 256 (2^8), and the fourth 1. Multiplying each octet by its place value and summing gives the single decimal integer. The binary form writes each octet as its own 8-bit binary pattern; the hex form writes each octet as two hexadecimal digits, since one byte is exactly two hex digits.
This conversion matters in practice because not every system speaks in dotted-decimal. Many databases and log formats store IPv4 addresses as a single 32-bit integer column for compact indexing and range queries; some firewall rules, geolocation lookup tables, or older networking tools expect hex or a raw decimal integer instead of the familiar dotted form. Converting cleanly between formats avoids manual arithmetic errors when moving data between these systems.
This instrument handles a single IPv4 address only — not IPv6 (which uses 128-bit addresses in an entirely different notation), and not a subnet or address range. For working out a whole subnet's network address, broadcast address, and usable host range from an address and a CIDR prefix, use this site's companion IP Subnet instrument.
- Enter Octet 1 through Octet 4 (each 0-255) — the four dotted-decimal segments of your IPv4 address.
- Read Decimal (32-bit integer) for the single-integer form of the address.
- Read Binary (dotted) for the full 32-bit binary pattern, grouped by octet for readability.
- Read Hex (dotted) for the two-hex-digit-per-octet form.
- Try 255.255.255.255 to see the maximum possible 32-bit value, or 0.0.0.0 for the minimum.
Worked example — 192.168.1.1, a private router address
192.168.1.1 is one of the most common private-network addresses, typically assigned to a home router's LAN interface. Converting to decimal: 192 x 16,777,216 + 168 x 65,536 + 1 x 256 + 1 = 3,221,225,472 + 11,010,048 + 256 + 1 = 3,232,235,777.
Decimal (32-bit integer) reads 3,232,235,777. Binary (dotted) reads 11000000.10101000.00000001.00000001 — each octet converted to its own 8-bit binary pattern. Hex (dotted) reads C0.A8.01.01 — each octet as two hex digits, a form you'll often see directly in network-hardware configuration interfaces and packet-capture tools.
Questions
How do you convert an IP address to a decimal number?
Multiply each of the four dotted-decimal octets by its place value — 16,777,216 for the first octet, 65,536 for the second, 256 for the third, and 1 for the fourth — then add the four results together. For 192.168.1.1, that's 192x16,777,216 + 168x65,536 + 1x256 + 1x1 = 3,232,235,777. This works because an IPv4 address is fundamentally one 32-bit number; dotted-decimal notation just splits it into four readable 8-bit pieces.
Why would I ever need an IP address as a plain decimal number?
Many databases store IPv4 addresses as a single 32-bit integer column rather than as text, since integers are smaller and faster to index and range-query than dotted strings — useful for things like IP-to-geolocation lookup tables, which are commonly distributed as ranges of decimal integers. Some legacy networking tools and log-analysis pipelines also expect or output addresses in this raw integer form.
What's the maximum possible IPv4 address value?
255.255.255.255, the IPv4 broadcast address, converts to 4,294,967,295 in decimal — the largest value a 32-bit unsigned integer can hold (2^32 - 1). Every valid IPv4 address falls somewhere between 0 (0.0.0.0) and that maximum, since the entire address space is exactly 2^32, about 4.3 billion addresses.
Does this tool work for IPv6 addresses?
No — this instrument is built specifically for IPv4's 32-bit, four-octet address format. IPv6 addresses are 128 bits long, written as eight groups of hexadecimal digits separated by colons (like 2001:0db8::1), and don't fit into this decimal/binary/hex-per-octet conversion scheme at all; IPv4 and IPv6 addresses are structurally different and aren't interchangeable through simple format conversion.
How is this different from the site's IP Subnet calculator?
This instrument converts a single IPv4 address between its decimal, binary, and hex representations — it doesn't involve a subnet at all. The IP Subnet instrument takes an address plus a CIDR prefix (like /24) and works out the entire surrounding network: the subnet mask, network and broadcast addresses, and the usable host range. Use this one for a plain format conversion, and the subnet tool when you need network-boundary math.