IP Address Converter - IPv4 in All Numeric Formats
Use this IP address converter to translate any IPv4 address between dotted-decimal, binary, hexadecimal, decimal integer, and octal formats with byte-aligned output.
IP Address Converter
Results
What Is IP Address Converter?
The IP address converter is a focused IPv4 format utility that turns any dotted-decimal address (for example 192.168.1.1) into its decimal, hexadecimal, binary, and octal equivalents. It also accepts the reverse direction, so you can paste a 32-bit integer or a hex string and read the address back in dotted-decimal. This makes it useful for network engineers, sysadmins, students, and developers who work with raw IP values in logs, configs, or code.
- • Network packet analysis: Convert a destination IP from a packet capture into the 32-bit integer or hex form used by header inspection tools and firewall rules.
- • Config and scripting: Translate between dotted-decimal IPs and the integer or hex values expected by iptables, nftables, inet_aton, and inet_pton.
- • Learning IPv4 addressing: See how the 32-bit IPv4 space splits into octets and how private and multicast ranges are encoded.
- • Reverse and forensic lookup: Read an integer or hex IP back to its dotted-decimal form when reviewing logs or threat-intel feeds.
Every IPv4 address is a 32-bit number. The dotted-decimal form is a human-readable split of that 32-bit value into four 8-bit octets, and the IP address converter exposes the underlying number in the four most common bases used in network tooling.
Because the conversion is exact across bases 2, 8, 10, and 16 of the same integer, no rounding is involved, and the result matches the format inet_aton and inet_pton return.
For CIDR and network planning that sits next to the converted address, the Subnet Calculator handles the matching /24 or /27 block in the same workflow.
How IP Address Converter Works
The conversion follows RFC 791's big-endian octet model: the first octet is the most significant byte of the 32-bit IPv4 value, and the last octet is the least significant byte. The calculator treats whichever input you provide as that 32-bit integer and renders the other bases from it.
- o1, o2, o3, o4: Four IPv4 octets in the range 0-255, read as big-endian bytes
- 16,777,216 (2^24): Weight of the first octet, the most significant byte
- 65,536 (2^16): Weight of the second octet
- 256 (2^8): Weight of the third octet
- 1 (2^0): Weight of the fourth octet, the least significant byte
The same 32-bit integer is converted to hexadecimal by repeated division by 16 and zero-padded to 8 digits so the output stays byte-aligned. The binary form is a 32-character string grouped into 8-bit octets to match the dotted-decimal reading order.
The octal form follows the same idea in base 8. The 32-bit integer is split into 3-digit groups, one per octet, so the result reads as 300.250.001.001 for 192.168.1.1.
Convert 192.168.1.1 to decimal, hex, and binary
Input: dotted-decimal 192.168.1.1
192 * 16,777,216 + 168 * 65,536 + 1 * 256 + 1 = 3,232,235,777
Decimal: 3,232,235,777 - Hex: C0A80101 - Binary: 11000000.10101000.00000001.00000001
The same integer read back as dotted-decimal gives 192.168.1.1, confirming the round-trip.
Convert decimal 0xC0A80101 back to dotted-decimal
Input: integer 3,232,235,777 (or hex C0A80101)
Octet 1 = floor(3,232,235,777 / 16,777,216) = 192; Octet 2 = floor(1,103,232 / 65,536) = 168; Octet 3 = floor(256 / 256) = 1; Octet 4 = 256 mod 256 = 1
Dotted-decimal: 192.168.1.1 - Binary: 11000000.10101000.00000001.00000001
Splitting the 32-bit integer back into 8-bit slices recovers the original dotted-decimal address.
According to IETF RFC 791, An IPv4 address is a 32-bit unsigned integer made of four 8-bit octets, with the first octet weighted by 2^24 and the last by 2^0.
When you also need to translate between KB, MB, GB, and TB alongside the IP work, the Data Storage Converter covers the storage side of the same network setup.
Key Concepts Explained
Four ideas make every output on this page predictable: the 32-bit IPv4 size, the big-endian octet order, the byte-aligned padding, and the address-class metadata derived from the leading bits.
32-bit IPv4 address
RFC 791 defines an IPv4 address as a 32-bit unsigned value. That single number is the only thing being converted; every other format is just a different way of writing the same integer.
Big-endian octet order
In dotted-decimal, the leftmost octet is the most significant byte (2^24) and the rightmost is the least significant byte (2^0). Network byte order uses the same order, which is why the binary output reads left-to-right the same way.
Byte-aligned padding
Hex is zero-padded to 8 digits, binary to 32 bits, and octal to 11 digits. The padding keeps each octet on its own byte boundary so the dotted binary and octal strings line up with the dotted-decimal form.
Address class and type
The leading bits of the 32-bit value determine the class (A, B, C, D, or E). Specific prefixes identify reserved ranges such as 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 127.0.0.0/8, and 224.0.0.0/4, which the calculator labels for context.
These four concepts explain why the binary output is grouped as four 8-bit chunks and why the hex output is always 8 characters, and why the same calculator can serve both directions of the conversion without ambiguity.
When you switch the input from dotted-decimal to integer or hex, the calculator still produces the same 32-bit value, so the class and type labels stay in sync.
Once the address is converted and the subnet is planned, the Bandwidth Calculator turns the link speed and utilization into the throughput available to the same host.
How to Use This Calculator
Type any IPv4 address into the field that matches your source format, and the other fields update in real time.
- 1 Pick your input format: Use dotted-decimal, decimal integer, or hex. Only one input needs to be filled.
- 2 Type the IP value: The calculator parses it on every keystroke, so you do not need to press Calculate.
- 3 Read the byte-aligned outputs: Binary and octal are split into 8-bit and 3-digit groups so the octets line up with the dotted-decimal form.
- 4 Check the class and type labels: Use the class (A, B, C, D, E) and type (private, loopback, multicast, public) to confirm whether the address falls inside a reserved range.
- 5 Copy the value you need: Select the exact format required by your script or config, then paste it. Reset restores the 192.168.1.1 example.
If a log line says 'src=3232235777', enter 3232235777 in the decimal integer field. The calculator shows 192.168.1.1, the hex C0A80101, the binary form, and labels the address as a Class C private network.
After you have the IP and the network speed, the Download Time Calculator estimates the time to push a file of a given size to or from the same endpoint.
Benefits of Using This Calculator
An IP address converter removes the manual arithmetic that tends to introduce mistakes when an address has to be matched across formats.
- • Removes base-conversion arithmetic: Stops you from re-deriving 192 * 2^24 + 168 * 2^16 by hand, which is easy to get wrong.
- • Covers all common IPv4 bases: Dotted-decimal, decimal integer, hexadecimal, binary, and octal in one place.
- • Reveals the address class and type: Labels private, loopback, multicast, and reserved ranges before you copy-paste into a config.
- • Byte-aligned by default: Pins hex to 8 digits, binary to 32 bits, and octal to 11 digits.
- • Round-trips lossless: Any input direction produces the same 32-bit value, so converting back returns the original address exactly.
- • Pairs with subnet planning: Sits next to the subnet calculator so the same IP can be matched against its CIDR block.
The strongest case for the tool is removing copy-paste mistakes between dotted-decimal IPs and the integer or hex forms used by routing daemons, firewall tables, and packet inspection libraries.
It is also useful as a teaching aid, because showing 192.168.1.1 next to its binary form makes the relationship between octets and 8-bit groups obvious.
When the surrounding workflow also needs to estimate how long the same endpoint takes to push a file of a given size, the Upload Time Calculator completes the network setup next to the converted IP.
Factors That Affect Your Results
Three things decide what the calculator displays: which input field you filled, how the 32-bit value is interpreted, and which range the resulting address falls into.
Input field you edit
Whichever field you typed in becomes the source of truth. The other two fields sync to the same 32-bit value, so the output is always consistent.
Big-endian octet order
The first octet is the most significant byte. Swapping the octet order (little-endian) would give a different integer, which is why network byte order and host byte order sometimes disagree.
Reserved-range membership
The type label changes the moment the integer crosses a 10.x, 172.16-31.x, 192.168.x, 127.x, 169.254.x, 224-239.x, or 240-255.x boundary, which is useful when validating configs.
Address class (A-E)
The class is determined by the leading bits. Class A starts at 0, Class B at 10, Class C at 110, Class D at 1110, and Class E at 1111, which is why small private networks live in different classes than large ISP allocations.
IPv4 vs IPv6 scope
This calculator covers IPv4 only. IPv6 addresses are 128-bit values and use a different parser, different prefixes, and different reserved-range rules.
- • Only IPv4 is supported. IPv6 addresses (for example 2001:db8::1) are out of scope and would need a separate parser and 128-bit representation.
- • The class labels follow the original RFC 1166 definition. Modern routing uses CIDR, so two addresses in different classes can still sit in the same routable block.
- • Reverse DNS (mapping a numeric IP back to a hostname) is not performed. The tool only translates between numeric forms.
If you only care about the dotted-decimal result, the type label is a sanity check. If you are validating a configuration, the type label is the most important field, because it tells you whether the address will route at all.
The type label is based purely on the leading bits. The IANA registry is the source of truth for which blocks are reserved, and the calculator mirrors those rules.
According to IETF RFC 1166, IPv4 addresses are grouped into classes by leading-bit pattern: 0 for A, 10 for B, 110 for C, 1110 for D, and 1111 for E.
According to IANA IPv4 Special-Purpose Address Registry, 10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16, 127.0.0.0/8, and 224.0.0.0/4 are reserved for private, loopback, and multicast use.
Frequently Asked Questions
Q: How do you convert an IP address to binary?
A: Convert each octet of the dotted-decimal IP into its 8-bit binary value, then join the four 8-bit groups with dots. For 192.168.1.1, the result is 11000000.10101000.00000001.00000001. The IP address converter does this automatically and zero-pads every octet to 8 bits.
Q: What is the decimal value of an IP address?
A: The decimal value is the 32-bit integer you get by treating the four octets as a big-endian number. 192.168.1.1 equals 192 * 2^24 + 168 * 2^16 + 1 * 2^8 + 1, which is 3,232,235,777. That integer is what inet_aton and many firewall tools store.
Q: How do I convert an IP address to hexadecimal?
A: Convert the 32-bit integer to base 16 and zero-pad to 8 digits. 192.168.1.1 becomes C0A80101, because 0xC0 is 192, 0xA8 is 168, and 0x01 is 1. The leading 0x is optional; the calculator accepts either form.
Q: Can I convert an IP address from decimal back to dotted decimal?
A: Yes. Enter the integer (for example 3,232,235,777) in the decimal field. The calculator splits it into 8-bit groups and reads them back as octets, so 3,232,235,777 returns 192.168.1.1. The same round-trip works from a hex string such as C0A80101.
Q: Does the IP address converter work with IPv6?
A: No. This page covers IPv4 only, which is a 32-bit address space. IPv6 uses 128-bit values, hexadecimal groups, and different reserved-range rules, so it needs a separate parser and a separate calculator page.
Q: Why does my IP address show as 0.0.0.0 after converting?
A: 0.0.0.0 is a real reserved address meaning 'this network' or 'any address on this host.' It is not an error. It is what you get when every octet is 0, when the integer field is empty or zero, or when the input cannot be parsed. Check the type label to confirm the result is the expected reserved range.