IPv4 Representations

Convert an IPv4 address to binary, decimal, hex, and octal, and convert back from each format.

← Convert Back

About This Tool

The IPv4 Address Format Converter translates IPv4 addresses between multiple representation formats: dotted-decimal (standard notation), binary, decimal (32-bit integer), hexadecimal, and octal. While dotted-decimal (e.g., 192.168.1.1) is the human-readable standard, other formats are used in programming, network protocols, URL obfuscation, low-level networking, and security research. This bidirectional tool allows conversion to all formats from standard IPv4, and conversion back to IPv4 from any numeric format, making it essential for developers, security analysts, and network engineers working with different systems and protocols.

How to Use

  1. To convert from IPv4: Enter a standard IPv4 address (e.g., 192.168.1.1) and click "Convert →"
  2. View the address in binary (32-bit), decimal (0-4294967295), hexadecimal, and octal formats
  3. To convert back: Enter a value in any of the four input fields (binary, decimal, hex, or octal)
  4. Click "Convert" in the reverse section to get the standard IPv4 address
  5. The tool supports both dotted and non-dotted notation for binary, hex, and octal
  6. Error messages will appear if the input format is invalid

Features

  • Bidirectional conversion between multiple IPv4 formats
  • Converts IPv4 to binary, decimal, hexadecimal, and octal
  • Converts binary, decimal, hex, or octal back to IPv4
  • Supports dotted notation for binary, hex, and octal (e.g., 0xC0.0xA8.0x01.0x01)
  • Supports non-dotted notation (e.g., 0xC0A80101)
  • Real-time validation with clear error messages
  • Handles full 32-bit decimal range (0 to 4,294,967,295)
  • Clean, separated display of each format

Common Use Cases

  • Understanding how IPv4 addresses are represented in different number systems
  • Converting IP addresses for use in programming (C, Python, JavaScript)
  • Decoding obfuscated URLs that use decimal or hex IP addresses
  • Working with raw network packets and binary data
  • Analyzing firewall rules or logs with non-standard IP formats
  • Security research and analyzing malicious URLs with encoded IPs
  • Educational purposes: teaching binary and hexadecimal number systems
  • Database storage optimization using integer representation
  • Debugging network applications that use numeric IP formats
  • Converting between formats required by different APIs and tools

Technical Details

IPv4 addresses are 32-bit numbers typically displayed in dotted-decimal notation for human readability. However, they can be represented in multiple numeric formats, all representing the same underlying 32-bit value.

Example: 192.168.1.1 in All Formats:

  • Dotted-Decimal: 192.168.1.1 (standard human-readable)
  • Binary: 11000000.10101000.00000001.00000001 (32 bits)
  • Decimal: 3232235777 (192×2^24 + 168×2^16 + 1×2^8 + 1×2^0)
  • Hexadecimal: 0xC0.0xA8.0x01.0x01 or 0xC0A80101
  • Octal: 0300.0250.01.01

Conversion Formula (Dotted to Decimal):

  • IP = A.B.C.D → Decimal = A×256³ + B×256² + C×256 + D
  • Example: 192.168.1.1 = 192×16777216 + 168×65536 + 1×256 + 1 = 3232235777

URL Obfuscation:

Browsers and many network tools accept IPv4 addresses in decimal or hexadecimal format:

  • http://192.168.1.1 (standard)
  • http://3232235777 (decimal, equivalent)
  • http://0xC0A80101 (hex, equivalent)
  • These are often used in phishing attempts to obscure the true destination

Programming Use Cases:

Many programming languages and databases store IP addresses as 32-bit integers (decimal) for efficiency:

  • Faster comparisons (integer comparison vs. string parsing)
  • More efficient storage (4 bytes vs. 15 characters)
  • Easier range operations (BETWEEN in SQL queries)

Binary Representation:

Binary format is essential for understanding subnetting, masks, and bitwise operations. Each octet is represented as 8 bits, with the tool displaying them in dotted format for clarity.

This tool handles all valid IPv4 addresses (0.0.0.0 to 255.255.255.255, or decimal 0 to 4294967295) and validates inputs to ensure accurate conversions.