IPv4 Converter
Convert IPv4 addresses between dotted decimal, binary, hexadecimal, and 32-bit integer. Paste any format and get all others instantly.
192.168.1.132322357770xC0A80101C0.A8.01.0111000000.10101000.00000001.00000001Bit layout
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
0xprefix (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:
| Octet | Value | Multiplier (Weight) | Calculation |
|---|---|---|---|
| Octet 1 (A) | 192 | 256³ = 16,777,216 | 192 × 16,777,216 = 3,221,225,472 |
| Octet 2 (B) | 168 | 256² = 65,536 | 168 × 65,536 = 11,010,048 |
| Octet 3 (C) | 1 | 256¹ = 256 | 1 × 256 = 256 |
| Octet 4 (D) | 1 | 256⁰ = 1 | 1 × 1 = 1 |
| Total Integer | Sum of all products | 3,232,235,777 | |
Common IP Addresses Across All Formats
| Description | Dotted Decimal | 32-Bit Integer | Hexadecimal | Binary (8-bit Octets) |
|---|---|---|---|---|
| Loopback (Localhost) | 127.0.0.1 | 2130706433 | 0x7F000001 | 01111111.00000000.00000000.00000001 |
| Google Public DNS | 8.8.8.8 | 134744072 | 0x08080808 | 00001000.00001000.00001000.00001000 |
| Cloudflare DNS | 1.1.1.1 | 16843009 | 0x01010101 | 00000001.00000001.00000001.00000001 |
| Home Gateway | 192.168.1.1 | 3232235777 | 0xC0A80101 | 11000000.10101000.00000001.00000001 |
| Broadcast Address | 255.255.255.255 | 4294967295 | 0xFFFFFFFF | 11111111.11111111.11111111.11111111 |
Practical Engineering Use Cases
- Database Query Optimization: Storing user IP logs as
INT UNSIGNEDrather thanVARCHAR(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.