IP to decimal converter
Convert an IPv4 address to a decimal number, hex, octal or binary, and back. Type it in any form and see all the others.
IPv4 192.0.2.235
read as dotted decimalExample: type your own address above.
Every form
- Dotted decimal
- 192.0.2.235
- Decimal (32-bit integer)
- 3221226219
- Hex
- 0xC00002EB
- Dotted hex
- 0xC0.0x00.0x02.0xEB
- Dotted octal
- 0300.0000.0002.0353
- Binary (dotted)
- 11000000.00000000.00000010.11101011
- Binary
- 11000000000000000000001011101011
- Short form a.b.c
- 192.0.747
- Short form a.b
- 192.747
- IPv4-mapped IPv6
- ::ffff:192.0.2.235
How it works
An IPv4 address is one 32-bit number. The dotted form splits it into four bytes, so 192.0.2.235 is 192 × 256³ + 0 × 256² + 2 × 256 + 235 = 3221226219. Databases often store addresses this way, because a number sorts and compares quickly.
Browsers and the C function inet_aton accept many more forms than the dotted one. Each part can be decimal, octal (a leading 0) or hex (a leading 0x). With fewer than four parts, the last part fills the remaining bytes. So http://3221226219/, http://0xC00002EB/ and http://192.0.747/ all open the same server.
Phishing emails use these forms to hide where a link goes, because few people recognise 3221226219 as an address. A leading zero is a trap too: 010.0.0.1 means 8.0.0.1, not 10.0.0.1. Paste a strange link host here to see the real address.
For IPv6 numbers, use the IPv6 to decimal converter. To see the network an address belongs to, use the subnet calculator.