IP Address Converter
Enter an address in one notation and read every other form: dotted decimal, integer, hex, binary, and compressed or expanded IPv6.
Detected: IPv4 dotted decimal
INET_ATON produces, and what a database stores when it wants range queries.::ffff: prefixes means the listener is dual-stack, not that the clients are on IPv6.in-addr.arpa; IPv6 reverses every nibble under ip6.arpa.Worked example
203.0.113.45 in each form:
| Form | Value |
|---|---|
| Dotted decimal | 203.0.113.45 |
| 32-bit integer | 3405803821 |
| Hexadecimal | 0xCB00712D |
| Binary | 11001011.00000000.01110001.00101101 |
| IPv4-mapped IPv6 | ::ffff:203.0.113.45 |
The arithmetic is 203 x 256^3 + 0 x 256^2 + 113 x 256 + 45.
Ambiguous forms are flagged, not guessed
A value like 010.0.0.1 is ambiguous: some parsers read a leading zero as octal, others reject it, and others ignore it. Rather than picking one interpretation, the converter shows the possibilities and marks the input as non-canonical. Silent disagreement between parsers on exactly this point has produced access-control bypasses in real software, so it is worth surfacing.
Everything runs locally
No conversion request leaves your browser.
About this tool
An internet address can be written in several forms that all mean the same number. Enter one and every other form appears at once. IPv4 converts between dotted decimal, 32-bit integer, hexadecimal, octal, and binary. IPv6 converts between compressed and fully expanded notation, and handles the IPv4-mapped and IPv4-compatible forms. All conversion runs in your browser.
How to read the result
- Dotted decimal
- The normal way to write an address, four octets from 0 to 255 with dots between them. The dots are a display convention for humans, and the address itself is a single 32-bit number.
- 32-bit integer
- The whole address as one unsigned number from 0 to 4294967295, big-endian. Databases store addresses this way so that a range test becomes a BETWEEN clause, and it is what MySQL INET_ATON produces.
- Hexadecimal
- The address in base sixteen, eight hex digits, sometimes shown per octet. It turns up in packet captures and in the /proc/net files on Linux, where the byte order is often little-endian and therefore reversed from what you expect.
- Binary
- The address as 32 ones and zeros, usually grouped per octet. This is the view that makes subnet boundaries obvious, because a prefix length is a count of the leading bits every address in the block shares.
- IPv6 compressed and expanded
- RFC 5952 defines the canonical short form as lowercase hex, with the leading zeros in each group removed and one run of consecutive zero groups replaced by a double colon. The double colon may appear only once, and RFC 5952 says it should not replace a single group.
- IPv4-mapped IPv6
- The form ::ffff:203.0.113.45, defined in RFC 4291, which dual-stack sockets use so an IPv4 connection reaches the application as an IPv6 address. A log full of ::ffff: prefixes means the server has a dual-stack listener, not that the clients are on IPv6.
Questions people ask
- Why would an address be stored as an integer?
- Range queries and storage size. A 32-bit integer column indexes and compares faster than a string, so "is this address inside this block" becomes a BETWEEN clause. MySQL provides INET_ATON and INET_NTOA for the conversion; PostgreSQL has native inet and cidr types and does not need the trick.
- Is http://2130706433 the same as http://127.0.0.1?
- In most browsers and libraries, yes, because they accept an integer form. Older parsers also accept octal and mixed forms, which is why 127.0.0.1 can be written many ways. That variety has caused real security bugs where a filter checked one form and the fetch used another.
- What is the correct way to write an IPv6 address?
- RFC 5952 sets the canonical form: lowercase, no leading zeros within a group, the longest run of zero groups replaced by a double colon, and if two runs tie, the leftmost is compressed. Following it makes addresses comparable as strings.
- Why does my server log show ::ffff:203.0.113.45?
- The listening socket is dual-stack, so incoming IPv4 connections are presented to the application as IPv4-mapped IPv6 addresses. The client is on IPv4. Strip the ::ffff: prefix before comparing against an IPv4 allowlist, or the comparison fails silently.
- Does converting an address change anything about it?
- No. All the forms are the same number written differently. The conversion matters only for tools that accept one form and not another.
Related
Last reviewed 2026-09-05.