>>
Each octet must be 0–255. Results update live.
Convert any IPv4 dotted-quad address to its 32-bit unsigned decimal integer and reverse with BunchTool's free IP to Decimal Converter. Every conversion shows a step-by-step per-octet bitwise left-shift breakdown — (A<<24)+(B<<16)+(C<<8)+D — or the corresponding unsigned right-shift extraction for decimal-to-IP. All arithmetic runs entirely in browser JavaScript with no server contact.
(A*16,777,216)+(B*65,536)+(C*256)+D(dec>>>24)&255 per octetChoose IP → Decimal to convert a dotted-quad address to a 32-bit integer, or Decimal → IP to reverse a decimal integer back to dotted notation.
Type an IPv4 address like 192.168.1.1 (octets 0–255) or a 32-bit integer between 0 and 4,294,967,295. Results update live on every keystroke.
View the converted value and the full per-octet bitwise left-shift or unsigned right-shift calculation showing exactly how each octet was processed.
Uses exact positional weights: A × 16,777,216 + B × 65,536 + C × 256 + D — equivalent to (A<<24)|(B<<16)|(C<<8)|D — and displays each per-octet component in a monospace breakdown.
Switch instantly between IP-to-Decimal (left-shift encoding) and Decimal-to-IP (unsigned right-shift extraction via >>> and & 255 masking) without reloading the page.
All integer arithmetic executes in browser RAM via JavaScript. Your IP addresses are never transmitted to any server — critical for privacy when converting internal network addresses.
Decimal = (A × 16,777,216) + (B × 65,536) + (C × 256) + D. For 192.168.1.1: (192<<24) + (168<<16) + (1<<8) + 1 = 3,232,235,777.A = (dec>>>24)&255, B = (dec>>>16)&255, C = (dec>>>8)&255, D = dec&255.BETWEEN integer1 AND integer2 SQL query — far faster than string pattern matching.255.255.255.255 converts to 4,294,967,295 (2³² − 1), which is the largest unsigned 32-bit integer value.IPv4 address structure: An IPv4 address is a 32-bit binary number conventionally written as four decimal octets separated by dots (A.B.C.D). Each octet represents 8 bits, giving a range of 0–255. The full 32-bit space spans 2³² = 4,294,967,296 unique addresses. The dotted-decimal notation is a human-readable convenience — the underlying value is always a single 32-bit unsigned integer.
Left-shift encoding (IP → Decimal): The first octet A occupies bits 24–31 (most significant byte) and is weighted by 2²⁴ = 16,777,216. Octet B occupies bits 16–23 with weight 2¹⁶ = 65,536. Octet C occupies bits 8–15 with weight 2⁸ = 256. Octet D occupies bits 0–7 (least significant byte) with weight 1. The formula Decimal = (A * 16,777,216) + (B * 65,536) + (C * 256) + D is equivalent to the bitwise expression (A << 24) | (B << 16) | (C << 8) | D.
Unsigned right-shift decoding (Decimal → IP): JavaScript's >>> operator performs an unsigned (zero-filling) right-shift, essential to prevent sign-extension errors on integers ≥ 2³¹ (2,147,483,648). Each octet is isolated by shifting the integer right by the appropriate multiple of 8 and ANDing with 0xFF (255): A = (dec >>> 24) & 255. This process is also used in Linux kernel IP routing tables and RFC 791 implementations for subnet masking.