IP Address to Integer Converter Online
Convert an IPv4 or IPv6 address to its decimal, hex and binary form, and back again, right in your browser.
The IP Address to Integer Converter runs entirely in your browser. Addresses and numbers you type are never uploaded or sent to ArrayKit.
Open the CIDR Calculator
About IP Address to Integer Converter
IP Address to Integer Converter turns any IPv4 or IPv6 address into its decimal, hexadecimal and binary equivalents, and converts a plain number back into a readable IP address. It auto-detects the address family from the input — dotted-quad IPv4 or colon-separated IPv6 — so you never have to pick a mode manually when converting an address. Switch direction to type a decimal or 0x-prefixed hex integer and get back the shortest valid IPv4 or IPv6 form, with the correct '::' compression applied automatically for IPv6. It is handy for reading raw IP values out of database columns, firewall logs, or binary protocol dumps, and for building bitmask, subnet, or access-control logic that expects a numeric address. Built for backend engineers, network admins, and anyone debugging packet captures. Everything runs locally in your browser — no address is uploaded.
Features
- Converts IPv4 addresses to a 32-bit unsigned decimal, hex and binary value
- Converts IPv6 addresses to a 128-bit decimal, hex and binary value
- Auto-detects IPv4 vs IPv6 from the input using the presence of a colon
- Converts an integer back to IPv4 or IPv6, choosing the address family by magnitude
- Accepts decimal or 0x-prefixed hexadecimal integers as input
- Applies correct IPv6 '::' zero-compression when formatting the address
- Clear inline error for out-of-range octets, malformed hextets, or invalid numbers
- Runs entirely in your browser with no address or number sent anywhere
How to use the IP Address to Integer Converter
- Keep the IP → Integer tab selected
- Type an IPv4 address like 192.168.1.1 or an IPv6 address like 2001:db8::1
- Read the Decimal, Hex, and Binary values for the address
- Switch to Integer → IP and type a decimal or 0x hex number to get the address back
Example
Input
192.168.1.1
Output
Decimal: 3232235777
Hex: 0xC0A80101
Each IPv4 octet is packed into a 32-bit unsigned integer, then shown as hex and binary too.
Common errors & troubleshooting
- "Octet 256 is out of range" when converting an IPv4 address. — Every IPv4 octet must be between 0 and 255. Check for a typo, like 256.0.0.1 instead of 25.0.0.1.
- "Invalid hextet" error on an IPv6 address. — Each group between colons must be 1-4 hex digits (0-9, a-f). Remove stray characters and make sure only one '::' is used.
- Integer → IP shows an unexpected IPv6 address instead of IPv4. — Values above 4294967295 (2^32-1) do not fit in an IPv4 address, so the IP Address to Integer Converter automatically renders them as IPv6 instead.
- Pasted hex value is not recognized as a number. — Prefix hex integers with 0x, for example 0xC0A80101, so the converter can tell it apart from a decimal value.
Frequently asked questions
- What does the IP Address to Integer Converter calculate for IPv4?
- It packs the four octets into a single unsigned 32-bit integer — the same value databases and routing tables often store — and also shows it as hexadecimal and binary.
- Does the IP Address to Integer Converter support IPv6?
- Yes. IPv6 addresses are converted to and from a 128-bit decimal, hex, and binary value, with correct '::' zero-compression when formatting the address.
- How does the tool know whether my address is IPv4 or IPv6?
- It checks for a colon in the input. An address with colons, like 2001:db8::1, is treated as IPv6; a dotted address, like 192.168.1.1, is treated as IPv4.
- Can I convert an integer back into an IP address?
- Yes. Switch to Integer → IP and enter a decimal or 0x-prefixed hex number. Values up to 4294967295 become an IPv4 address; larger values become IPv6.
- Does the IP to Integer converter upload the addresses I type?
- No. Every conversion happens locally in your browser using standard JavaScript math — the address or number you enter never leaves your device.
- Why does the binary value have so many digits?
- IPv4 binary output is always 32 bits and IPv6 binary output is always 128 bits, zero-padded, so you can see exactly how the address maps into its raw bit pattern.
Related tools
- CIDR / Subnet Calculator — Calculate network, broadcast, host range and mask from a CIDR block.
- IPv6 ↔ IPv4 Converter — Convert between IPv4 and IPv6 (mapped/expanded/compressed) and extract embedded IPv4.
- IP Range to CIDR — Convert a start and end IP address into the minimal set of CIDR blocks, and back.
- User Agent Parser — Parse a User-Agent string into browser, engine, operating system and device, in your browser.
- Number Base Converter — Convert integers between binary, octal, decimal and hex.
- Bitwise Calculator — Apply AND, OR, XOR, NOT and bit shifts to integers, with binary, hex and decimal views.
All ArrayKit tools