IPv4 address converter
This IPv4 converter shows each address in four forms: dotted decimal, a 32-bit whole number, hexadecimal and binary. Developers storing IP addresses in databases, network engineers and students learning binary use it to move between formats.
- Runs in your browser
- Free, no account needed
- Copy or download the result
Result
The short answer
An IPv4 address is a 32-bit number written as four bytes. To get the whole-number form, multiply the four bytes by 256^3, 256^2, 256 and 1 and add them up. Hex and binary are the same 32 bits written in base 16 and base 2.
FormulaInteger = a x 256^3 + b x 256^2 + c x 256 + d for the address a.b.c.d
Worked example192.168.1.10 converts to the integer 3232235786, the hex value 0xC0A8010A and the binary form 11000000.10101000.00000001.00001010, and the same table turns the integer 3232235777 back into 192.168.1.1.
Example
192.168.1.10 3232235777 0x08080808 0b00001010000000000000000000000001
| Dotted | Integer | Hex | Binary |
|---|---|---|---|
| 192.168.1.10 | 3232235786 | 0xC0A8010A | 11000000.10101000.00000001.00001010 |
| 192.168.1.1 | 3232235777 | 0xC0A80101 | 11000000.10101000.00000001.00000001 |
| 8.8.8.8 | 134744072 | 0x08080808 | 00001000.00001000.00001000.00001000 |
| 10.0.0.1 | 167772161 | 0x0A000001 | 00001010.00000000.00000000.00000001 |
- Input rule
- hex needs 0x and binary needs 0b or dotted 8-bit groups, so neither is read as decimal.
How to use the ipv4 address converter
- Enter addresses in the IPv4 addresses box, one per line, in any supported form.
- Pick Hex letters and Binary style.
- Read the table, or the labeled rows for a single address. The result updates as you type; Run also works.
- Use Copy result or Download to keep the table.
How it works
The integer is the four octets read as one 32-bit number, from 0 to 4,294,967,295.
Hex input needs a 0x prefix, and binary input needs a 0b prefix or four dotted groups of 8 bits, so neither can be mistaken for decimal.
Octets with leading zeros, such as 192.168.01.1, are rejected because some software reads them as octal.
Each line is converted on its own. Lines that fail are listed with the reason, and up to 500 lines are accepted.
Everything runs in your browser. Your input is not uploaded or stored.
Sources
Questions and answers
How do I convert an IP address to a number?
Multiply the first octet by 16,777,216, the second by 65,536 and the third by 256, then add all four parts. For 192.168.1.1 that gives 3,232,235,777.
Why are leading zeros rejected?
Some programs read 010 as octal 8 rather than decimal 10, so 010.0.0.1 can mean two different addresses. Rejecting them avoids silent mistakes.
Can I paste hex without 0x?
No. A string like 10101010 is also a valid decimal number, so the prefix is needed to know which one you mean.
Last updated November 1, 2026. Maintained by SnowRock. How our tools work
All 220 SnowRock tools