IP Address Converter
Last reviewed: June 11, 2026 — every conversion direction verified against known values.
Paste an IPv4 or IPv6 address in any representation — dotted-decimal, a plain integer, hexadecimal, or raw binary — and get every other representation at once. There is no "from/to" to pick: drop in what you have, read off what you need.
All representations
What this tool does
An IPv4 address is really just a single 32-bit unsigned integer that humans prefer to read as four dotted octets. Because it is one number, it can be written equally correctly as dotted-decimal (192.168.1.1), as that integer (3232235777), in hexadecimal (0xC0A80101), or as 32 binary digits (11000000.10101000.00000001.00000001). All four describe the exact same address — they are just different bases. This converter parses whichever form you give it back to the underlying number and then prints all of them, so you never have to chain two single-direction tools together.
IPv6 works the same way with a wider field: a 128-bit number, normally shown as eight colon-separated hextets with zero-compression (::). For an IPv6 input the tool shows the compressed form, the fully-expanded form, the 128-bit binary, and the raw integer.
How the IPv4 math works
Each octet is one byte, so the address is (o1 × 224) + (o2 × 216) + (o3 × 28) + o4. For 192.168.1.1 that is 192×16777216 + 168×65536 + 1×256 + 1 = 3232235777. Hexadecimal is just that integer in base 16 (C0A80101, two hex digits per octet), and binary is base 2 (eight bits per octet). Converting "back" is the same arithmetic in reverse — which is why a single number can drive every column you see.
When you actually need this
- Storing IPs in a database: many schemas store IPv4 as an unsigned
INTfor compact indexing and fast range queries. Convert to the integer to insert, and back to dotted to display. - Reading hex in packet captures and logs: tcpdump, firewall logs, and protocol fields often show addresses in hex. Paste the hex to get a human-readable IP.
- Subnet and ACL reasoning: seeing the binary makes the network/host boundary obvious, which is invaluable when you are learning subnetting or sanity-checking a mask.
- Lab work and study: CCNA/Network+ practice leans heavily on converting between decimal and binary by hand — use this to check your work.
For subnet ranges, masks, and host counts, use the CIDR / IP Converter; to look up who owns an address, see IP Lookup and WHOIS Lookup.
Gotchas worth knowing
- Leading zeros are dangerous. In some libraries (and the C
inet_atonfamily) an octet with a leading zero like010is read as octal (8), not 10. This tool treats octets as plain decimal and rejects out-of-range values, but be careful pasting such addresses elsewhere. - Signed vs unsigned. Any address above
127.255.255.255has the top bit set, so a 32-bit signed integer shows it as negative. The standard IP integer is unsigned; add4294967296to a negative signed value to recover it. - IPv6 zero-compression is not unique-looking.
::may appear only once, and the compressed and expanded forms are equal — the tool shows both so you can match whichever a config file expects.
FAQ
How do I convert an IP address to a decimal number?
Multiply the octets by 16777216, 65536, 256, and 1 and add them — or just paste the address above and read the "Decimal integer" row.
Why is my address negative in the database?
It is stored as a signed 32-bit integer. Add 4294967296 to the negative value to get the standard unsigned IP integer.
Is anything uploaded?
No — all conversion is local arithmetic in your browser; nothing is sent or stored.