>>
BunchTool — IP to Decimal Converter
🔗 Share
↺ Reset
🔢 Conversion Input
IPv4 Dotted-Quad Address

Each octet must be 0–255. Results update live.

✅ Conversion Result
Converted Value
Enter a value above to see the step-by-step bitwise calculation.
Related Tools

More free privacy tools


🛡️ Hardware & Privacy Tools

IP to Decimal Converter —
IPv4 Dotted-Quad to 32-Bit Integer & Back Free

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.

IP → Decimal via octet left-shifts: (A*16,777,216)+(B*65,536)+(C*256)+D
Decimal → IP via unsigned right-shifts: (dec>>>24)&255 per octet
Live per-octet bitwise calculation breakdown shown on every keystroke
100% private — IP addresses never leave your browser
🔢
32-bitInteger Range
BitwiseShift Math
BidirectionalConversion
How It Works

Convert IP addresses in three easy steps

Step 1
🔀
Select Conversion Direction

Choose 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.

Step 2
⌨️
Enter Your IP or Integer

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.

Step 3
🔬
Read Result & Bit-Shift Breakdown

View the converted value and the full per-octet bitwise left-shift or unsigned right-shift calculation showing exactly how each octet was processed.

Why BunchTool

Why use our free IP to Decimal tool?

🔢
Octet Left-Shift Arithmetic Engine

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.

🔀
Bidirectional — IP ↔ Decimal

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.

🔒
100% Client-Side — No IP Leaves Browser

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.

FAQ

Frequently asked questions

How is an IPv4 address converted to a decimal integer?
Each IPv4 octet is positionally weighted: 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.
How is a decimal integer converted back to an IPv4 address?
Each octet is extracted via unsigned right-shift and bitwise AND masking: A = (dec>>>24)&255, B = (dec>>>16)&255, C = (dec>>>8)&255, D = dec&255.
Why do databases store IP addresses as integers?
Integer storage is significantly more compact (4 bytes vs ~15 chars) and enables fast range queries. Checking if an IP falls within a subnet becomes a simple BETWEEN integer1 AND integer2 SQL query — far faster than string pattern matching.
What is the maximum 32-bit decimal for an IPv4 address?
The maximum IPv4 address 255.255.255.255 converts to 4,294,967,295 (2³² − 1), which is the largest unsigned 32-bit integer value.
Does this tool support IPv6?
No. IPv6 uses a 128-bit address space, producing integers up to 2¹²⁸ − 1 — far beyond JavaScript's safe integer range. This converter is designed specifically for 32-bit IPv4 addresses.
Detailed Guide

IPv4 Address Space, 32-Bit Octet Left-Shift Encoding, Unsigned Right-Shift Decoding & Database Integer Storage

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.

Other Collections

Explore other useful categories

Explore 247 more free tools —
no login, no limits.

BunchTool covers PDF editing, text conversion, SEO analysis, calculators, design tools, unit converters and much more. All 100% free, all browser-based.

Browse All 247 tools →