IP Base Converter
Convert IPv4 between decimal integer, hex, and binary.
What IP Address Conversion Does
An IPv4 address is usually written in the human-friendly dotted form (192.168.1.1), but under the hood it is a single 32-bit unsigned integer. You often need to move between these representations, for example when storing IPs as integers in a database, reading hex-encoded addresses in logs or packet dumps, or debugging bitwise operations.
This tool auto-detects the format of whatever you type, whether dotted IPv4, a decimal integer, hexadecimal (with a 0x prefix), or binary (with a 0b prefix), and computes all four representations. For example 192.168.1.1 is converted at once to the integer 3232235777, the hex 0xc0a80101, and its per-octet binary form.
Every conversion runs instantly in your browser and your input is never sent to a server, so even sensitive IP details are safe to enter.
How to Use
- Type a value in any format. A dot makes it IPv4, a 0x prefix makes it hex, a 0b prefix makes it binary, and digits alone are read as a decimal integer.
- Read all four representations, dotted, decimal integer, hex, and per-octet binary, from the result card at a glance.
- Use the copy button next to the representation you need to paste it into your code or query.
Frequently Asked Questions
- What is the benefit of storing an IP as an integer?
- A single integer takes less space than a string and makes comparison, sorting, and range lookups much faster. Queries like WHERE ip BETWEEN a AND b and indexing become far more efficient, which is why systems handling large volumes of IP data often store them as integers.
- Why is 192.168.1.1 equal to 3232235777?
- Each octet is shifted left by 8 bits and summed: 192×256³ + 168×256² + 1×256 + 1 = 3232235777. That is exactly the same value as the hex 0xC0A80101.
- What is the maximum value I can enter?
- Because IPv4 is 32 bits, valid values run from 0 to 4294967295 (2³²-1, or 0xffffffff in hex). Anything outside that range, or in an unrecognized format, is rejected as an error.