IPv4 Converter

Convert IPv4 addresses between dotted decimal, binary, hexadecimal, and 32-bit integer. Paste any format and get all others instantly.

Dotted decimal192.168.1.1
Integer3232235777
Hex (full)0xC0A80101
Hex (octets)C0.A8.01.01
Binary (dotted)11000000.10101000.00000001.00000001

Bit layout

11000000
192
10101000
168
00000001
1
00000001
1

Understanding IPv4 Address Representations

Under RFC 791, an Internet Protocol Version 4 (IPv4) address is fundamentally a 32-bit unsigned binary number. While humans typically interact with IPv4 addresses in dotted-decimal notation (such as 192.168.1.1), computers, network switches, and databases frequently represent the same address in alternative numeric formats.

  • Dotted Decimal: Four 8-bit octets separated by periods, with each octet ranging from 0 to 255 (e.g., 192.168.1.1).
  • 32-Bit Integer (Decimal): The entire 32-bit sequence treated as a single continuous base-10 number from 0 to 4,294,967,295 (e.g., 3232235777).
  • Hexadecimal: The 32 bits represented in base-16 with an 0x prefix (e.g., 0xC0A80101) or dot-separated hex bytes (e.g., C0.A8.01.01).
  • Binary: Four 8-bit binary strings showing every individual bit state (e.g., 11000000.10101000.00000001.00000001).

Conversion Formula & Mathematical Logic

To convert an IPv4 address formatted as A.B.C.D into its 32-bit integer equivalent, use the positional weight formula:

OctetValueMultiplier (Weight)Calculation
Octet 1 (A)192256³ = 16,777,216192 × 16,777,216 = 3,221,225,472
Octet 2 (B)168256² = 65,536168 × 65,536 = 11,010,048
Octet 3 (C)1256¹ = 2561 × 256 = 256
Octet 4 (D)1256⁰ = 11 × 1 = 1
Total IntegerSum of all products3,232,235,777

Common IP Addresses Across All Formats

DescriptionDotted Decimal32-Bit IntegerHexadecimalBinary (8-bit Octets)
Loopback (Localhost)127.0.0.121307064330x7F00000101111111.00000000.00000000.00000001
Google Public DNS8.8.8.81347440720x0808080800001000.00001000.00001000.00001000
Cloudflare DNS1.1.1.1168430090x0101010100000001.00000001.00000001.00000001
Home Gateway192.168.1.132322357770xC0A8010111000000.10101000.00000001.00000001
Broadcast Address255.255.255.25542949672950xFFFFFFFF11111111.11111111.11111111.11111111

Practical Engineering Use Cases

  • Database Query Optimization: Storing user IP logs as INT UNSIGNED rather than VARCHAR(15) reduces index disk space by 73% and allows high-speed range queries using binary comparison operators.
  • Cybersecurity & Log Analysis: Threat intelligence feeds and security analysts use integer and hexadecimal IP notation to uncover evasion techniques such as URL obfuscation in phishing payloads.
  • Firewall Rule Compilation: Network device drivers convert human-readable IP addresses into raw 32-bit hex words before loading them into TCAM (Ternary Content-Addressable Memory) for line-rate packet filtering.

Frequently Asked Questions

What is an IPv4 integer representation?

An IPv4 integer representation is the numeric value of an IP address treated as a single 32-bit unsigned integer (ranging from 0 to 4,294,967,295). Because an IPv4 address consists of exactly 32 bits, it can be mathematically represented as a single base-10 number without dots.

How do you convert a dotted-decimal IP to an integer mathematically?

Given an IP address A.B.C.D, the integer formula is: (A × 256³) + (B × 256²) + (C × 256) + D, or using bitwise operations: (A << 24) | (B << 16) | (C << 8) | D. For example, 192.168.1.1 equals (192 × 16,777,216) + (168 × 65,536) + (1 × 256) + 1 = 3,232,235,777.

Why do databases store IP addresses as integers instead of strings?

Storing IPv4 addresses as 4-byte unsigned integers (INT UNSIGNED in MySQL/MariaDB or BIGINT in PostgreSQL) saves 70% storage space compared to VARCHAR(15), speeds up B-Tree indexing, and makes subnet range queries (BETWEEN start_ip AND end_ip) significantly faster.

Can you ping an integer or hexadecimal IP address directly in terminal?

Yes. Most operating system network stacks (Linux, macOS, Windows) and browsers natively parse alternate IP formats. For example, executing "ping 2130706433" is identical to "ping 127.0.0.1", and "ping 0x7F000001" resolves to localhost.

Does Yurlie send my IP address queries to external servers?

No. This tool runs 100% client-side in your web browser using JavaScript. No IP addresses, subnet parameters, or network inputs are ever transmitted to or logged on any server.