How to Use the Converter
Begin by selecting your input format from the dropdown menu. You can choose IPv4/IPv6 standard notation (like 192.168.0.1 or 2001:db8::1), binary, hexadecimal, decimal, octal, or enable autodetection for the system to identify the format automatically. Paste or type your value into the input field. The calculator processes the entry and displays equivalent representations in all supported formats.
When autodetect is enabled and your input matches multiple valid formats, the tool will flag it as ambiguous and ask you to specify which format you intended. This prevents incorrect conversions when, for example, a string could be read as either hexadecimal or decimal.
Conversion Methodology
Each conversion follows a systematic approach. To convert an IPv4 address to hexadecimal, split the address into four octets, transform each decimal value to its two-digit hex equivalent (padding with a leading zero if needed), then concatenate the results. Binary conversion uses the same octet-by-octet approach but produces eight binary digits per octet. Decimal representation treats the entire 32-bit address as a single unsigned integer. Octal conversion works similarly to hexadecimal but uses base-8 notation.
IPv4 Address = octet₁ . octet₂ . octet₃ . octet₄
Hex = (octet₁ in hex)(octet₂ in hex)(octet₃ in hex)(octet₄ in hex)
Binary = (octet₁ in binary)(octet₂ in binary)(octet₃ in binary)(octet₄ in binary)
Decimal = (octet₁ × 256³) + (octet₂ × 256²) + (octet₃ × 256) + octet₄
octet₁, octet₂, octet₃, octet₄— Individual decimal values (0–255) that form an IPv4 addressHex— Hexadecimal representation using digits 0–9 and letters A–FBinary— Base-2 notation using only 0 and 1Decimal— Standard base-10 representation of the full 32-bit address
IPv4 vs. IPv6 Considerations
IPv4 addresses consist of four octets (32 bits total) and are the traditional format still widely used in most networks. Each octet ranges from 0 to 255 in decimal. IPv6 addresses are 128 bits long, represented as eight 16-bit groups in hexadecimal notation separated by colons, with compression allowed (double colon notation). This calculator handles both formats seamlessly—when you input an IPv6 address, the binary representation will have 128 bits instead of 32, and the decimal equivalent will be a much larger number.
For subnet and CIDR calculations, understanding these bit lengths is crucial. A /24 IPv4 subnet mask masks 24 bits, leaving 8 bits for host addresses. With IPv6, a /64 prefix is common for subnetting, leaving 64 bits for interface identifiers.
Common Pitfalls and Best Practices
Avoid these mistakes when converting or working with different IP representations:
- Padding and Leading Zeros — When converting to hexadecimal, always use two hex digits per octet (e.g., 0C instead of C). In binary output, each octet must be exactly eight bits. Forgetting padding leads to ambiguous or incorrect representations that won't parse correctly in network tools.
- Format Ambiguity — Some strings are valid in multiple formats. For instance, '10' could be decimal (the decimal number 10), binary (which would be invalid as it only has one bit), or hex (decimal 16). The autodetect feature flags these edge cases to prevent silent conversion errors.
- Byte Order and Notation Variants — Different tools display addresses in different styles: grouped hexadecimal (C0.A8.00.01), continuous hex (C0A80001), dotted-decimal binary (11000000.10101000.00000000.00000001), or continuous binary. All represent the same value—recognise which format your tool expects before feeding the output elsewhere.
- IPv6 Expansion — IPv6 addresses often use shorthand notation with double colons (::) representing consecutive zero groups. When converting, ensure you're working with the fully expanded form. Most tools will auto-expand this, but manual conversions require careful attention to bit alignment.