IP address to binary, decimal and hex
Handy for networking students, for storing addresses as one number in a database, and for seeing how a mask applies bit by bit.
Loading the tool…
Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.
How to use it
- Enter ipv4 address.
- The result appears straight away and updates as you edit.
- Copy the result, or copy a link that keeps the same values to share it.
How it is calculated
Integer = a × 16777216 + b × 65536 + c × 256 + d for address a.b.c.d. Each octet is written as 8 binary digits.
Example
Inputs: IPv4 address = 192.168.1.10. Result: Binary: 11000000.10101000.00000001.00001010.
192.168.1.10
11000000.10101000.00000001.00001010
Limits and caveats
- Accepts dotted-decimal IPv4 only and refuses leading zeros, since some systems read them as octal.
Questions about this tool
Why convert an IP to one number?
Storing it as an integer saves space and turns range lookups into a simple numeric comparison.
How many bits are in an IPv4 address?
32 bits, split into four 8-bit octets.
Does byte order change the result?
The tool uses network byte order (big-endian), where the first octet is the most significant.
