IP Converter
Convert an IPv4 address between dotted-decimal, decimal integer, hex, binary, octal, and IPv6-mapped notation. Type in any format — the rest are computed instantly. Runs entirely in your browser.
Same address, six representations
An IPv4 address is just 32 bits. The dotted form is for humans; integer, hex, and binary are for databases and routing tables.
Dotted: 192.168.1.1 Integer: 3,232,235,777 Hex: 0xC0A80101 Binary: 11000000.10101000.00000001.00000001 Octal: 030052000401 IPv6: ::ffff:192.168.1.1
SELECT * FROM logs
WHERE ip BETWEEN ipToInt('10.0.0.0')
AND ipToInt('10.255.255.255')
→ Single integer comparison
→ Indexable
→ ~4 bytes vs 15 for stringWhat you'll use this for
UUIDs are the universal "give me a unique identifier" tool — no central coordination required.
Compact storage
Store IPs as a 4-byte INT in your DB. Saves space and speeds up range queries.
Log analysis
Convert dotted IPs to integers to do range BETWEEN queries against subnet boundaries.
Subnet math
Hex and binary forms show subnet bits clearly — the boundary stands out visually.
Dual-stack work
IPv6-mapped form (::ffff:1.2.3.4) lets IPv6 sockets carry IPv4 packets.
How to convert an IP address
Type the IP
Enter dotted-decimal (192.168.1.1) — or paste a decimal integer below.
Hit Convert
Or just keep typing — the other forms update automatically as soon as the input is valid.
Read the results
Integer, hex, binary, octal, and IPv6-mapped notation all appear on the right.
Copy what you need
Click any value to copy it (or use the Copy button to grab all formats).
Frequently asked questions
An IPv4 address is 32 bits packed as four octets. Treating those 32 bits as a single unsigned integer gives you a number from 0 to 4,294,967,295. Useful for compact storage and indexed range queries.
Databases store IPs as integers for compact indexing. Hex and binary forms make subnet boundaries obvious — useful when reasoning about a netmask. IPv6-mapped form lets IPv6 stacks transport IPv4 traffic.
Big-endian (network byte order). The first octet is the most significant byte: 192.168.1.1 = (192<<24) | (168<<16) | (1<<8) | 1.
This tool focuses on IPv4. The ::ffff:x.x.x.x form is the IPv4-mapped IPv6 address — same 32 bits embedded in an IPv6 address. See IPv4 to IPv6 for that direction.
Yes. No signup, no limits, no ads. Conversion happens entirely in your browser.
About IPv4 address formats
An IPv4 address is a 32-bit identifier. Each of the four octets in the dotted form is one byte (0–255). The same 32 bits can be expressed in any base.
Formats
- Dotted-decimal —
192.168.1.1, the human form. - Decimal integer —
3232235777, useful for DB storage. - Hex —
0xC0A80101, common in firewall configs. - Binary —
11000000.10101000.00000001.00000001, shows netmask bits. - IPv6-mapped —
::ffff:192.168.1.1, dual-stack representation.
Conversion math
- To integer:
(a<<24) | (b<<16) | (c<<8) | d - From integer: extract each byte with
(n >>> (24-8k)) & 0xff.