IPv6 Integer Converter
Convert IPv6 addresses to integer values.
IPv6 Integer Converter: inputs and results
Enter an IP address, CIDR prefix, or range. Then check its first and last address below.
Calculated Boundaries & ParametersReady
Key Capabilities
- •100% Client-Side: Zero telemetry or server latency.
- •RFC Compliant: Exact 32-bit and 128-bit integer precision.
- •Quick Copy: Instant access to CIDR, mask, and range bounds.
- •Cross-Platform: Works on desktop, tablet, and mobile browsers.
Related IPv6 ToolsAll Tools
IPv6 Range Calculator
Find IPv6 prefix boundaries.
IPv6 Subnet Calculator
Calculate prefix details and address counts.
IPv6 /127 Link Planner
Divide a parent prefix into address pairs.
IPv6 /128 Address Calculator
Calculate single-address IPv6 prefix details.
IP Address Validator
Check IPv4 or IPv6 address syntax.
IPv6 Binary Converter
Display address bits.
How IPv6 Integer Converter Works?
This tool works by expanding the address to 8 groups and accumulating each 16-bit group into a 128-bit unsigned integer.
Enter an IPv6 address
Type an address such as
2001:db8::1.Expand to 8 groups
2001:0db8:0000:0000:0000:0000:0000:0001.Accumulate the groups
The converter multiplies the running total by 65,536 and adds the next group, 8 times.
Print the integer
The result is a decimal number up to 39 digits long. The reverse direction turns the integer back into an address.
IPv6 Integer Converter Formula
The formula is Integer = Σ groupᵢ × 65,536^(8 − i), for i from 1 to 8.
Positional sum
N = g1·2^112 + g2·2^96 + … + g8·2^0Each group is worth 2^16 times the next group.
Maximum value
2^128 − 1340,282,366,920,938,463,463,374,607,431,768,211,455.
Reverse step
g_i = floor(N ÷ 2^(16·(8−i))) mod 65,536Extracts each group from the integer.
Worked example: 2001:db8::1
2001 hex = 8,193 db8 hex = 3,512 N = 8,193 × 2^112 + 3,512 × 2^96 + 1 N = 42,540,766,411,282,592,856,903,984,951,653,826,561
IPv6 Integer Converter Conversion Table
The table maps 10 IPv6 addresses to their 128-bit decimal integer values.
| IPv6 Address | Integer Value |
|---|---|
| :: | 0 |
| ::1 | 1 |
| ::ffff:0:0 | 281,470,681,743,360 |
| 2001:db8:: | 42,540,766,411,282,592,856,903,984,951,653,826,560 |
| 2001:db8::1 | 42,540,766,411,282,592,856,903,984,951,653,826,561 |
| 2001:db8:ffff:ffff:ffff:ffff:ffff:ffff | 42,540,766,490,510,755,371,168,322,545,197,776,895 |
| fd00::1 | 336,294,682,933,583,715,844,663,186,250,927,177,729 |
| fe80::1 | 338,288,524,927,261,089,654,018,896,841,347,694,593 |
| ff02::1 | 338,963,523,518,870,617,245,727,861,364,146,307,073 |
| ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff | 340,282,366,920,938,463,463,374,607,431,768,211,455 |
What is IPv6 Integer Converter?
The IPv6 Integer Converter is a tool that converts an IPv6 address to its 128-bit unsigned integer value and back.
Databases and analytics tools compare integers far faster than strings. Storing IPv6 addresses as integers allows range queries such as BETWEEN start AND end. The integer can reach 39 decimal digits, so it needs a DECIMAL(39,0) column, a 16-byte binary column, or a native IPv6 type.
JavaScript numbers lose precision above 2^53. The converter uses BigInt arithmetic, so every integer is exact.
What are the uses of IPv6 Integer Converter?
There are 4 main uses of the IPv6 Integer Converter, including database storage, range queries, and debugging.
Storing addresses in databases
Integer or 16-byte binary storage sorts and indexes IPv6 addresses correctly.
Running range queries
Geolocation lookups compare an address integer with start and end integers.
Debugging application code
Developers compare integer output from their code with the converter result.
Computing address arithmetic
Offsets and distances between IPv6 addresses become simple integer math.