Convert IP to Binary
Convert IPv4 to 32-bit binary with class detection, CIDR support, and special-IP flags. Free, offline, client-side, instant.
- Runs in your browser
- Nothing uploaded
- Free, no sign-up
Convert IPv4 addresses to 32-bit binary. Supports CIDR notation (192.168.1.0/24) - shows the subnet mask, network, broadcast, and host count. Detects IP class (A/B/C/D/E) and tags special-purpose ranges (private, loopback, multicast, CGNAT).
How to Use Convert IP to Binary
- Paste your IPv4 addresses - one per line, in dotted-decimal notation (
192.168.1.1). Add a CIDR suffix (/24) to compute subnet details. - Pick an output format - Dotted binary mirrors the four-octet structure (default), Continuous binary gives a single 32-bit string for direct integer comparison, Hex pairs is the compact 8-hex-digit form, Decimal echoes the input for verification.
- Hit Convert - or just type; the 200 ms debounce updates as you go. Ctrl+Enter (⌘+Enter on Mac) forces a recompute.
- Read the breakdown - each IP shows: input → output, color-coded class tag (A/B/C/D/E), special-purpose label if applicable (private, loopback, CGNAT, etc.).
- For CIDR entries - the breakdown also shows the prefix, subnet mask (decimal + binary), network address, broadcast address, and total usable host count (=2^(32-prefix) − 2 for prefixes < 31).
- Check the stats line - total converted, class distribution (e.g., "3A 2C"), error count, plus CIDR and special-IP counters.
- Copy or download - Copy puts the formatted output on your clipboard; Download saves
ip-to-binary.txt. Per-line errors don't abort the batch - invalid lines are flagged red and the valid ones still convert.
Frequently Asked Questions
What are IPv4 address classes?
RFC 791’s classful network design: Class A starts with bit 0 (0-127), Class B with bits 10 (128-191), Class C with bits 110 (192-223), Class D is multicast (224-239), Class E is reserved/experimental (240-255). Classful routing is obsolete in production (CIDR replaced it in 1993) but the classifications still appear on networking exams and in legacy docs.
How do you detect “special-purpose” IPs?
Per IANA’s IPv4 Special-Purpose Registry: 10/8, 172.16/12, 192.168/16 are RFC 1918 private; 127/8 is loopback; 169.254/16 is link-local APIPA; 100.64/10 is carrier-grade NAT (CGNAT, RFC 6598); 224/4 is multicast; 255.255.255.255 is the limited broadcast. We pack each IP into a 32-bit integer and range-check against the table – exact, fast, no string matching.
How does CIDR mask computation work?
A /N prefix produces a mask with N leading 1s followed by (32-N) zeros. For /24: 11111111.11111111.11111111.00000000 = 255.255.255.0. The network address is ip & mask; the broadcast is network | ~mask. Usable host count is 2^(32-N) − 2 (network + broadcast aren’t assignable). For /31 and /32 the host count is 0 (RFC 3021 allows special point-to-point use of /31).
Why use binary representation at all?
Binary makes subnet math obvious. 192.168.1.130 & 255.255.255.128 = 192.168.1.128 is unintuitive in decimal, but in binary you can SEE the AND operation: 10000010 & 10000000 = 10000000. Network engineers learn IP via binary because every routing decision boils down to bit comparisons.
Does it handle IPv6?
No – this tool is IPv4-only. IPv6 addresses are 128 bits (eight 16-bit groups in hex) instead of 32 bits, with entirely different notation and special ranges. A separate IPv6 tool would be needed.
What’s the difference between the four output formats?
Dotted: 11000000.10101000.00000001.00000001 – easy to map back to octets. Continuous: 11000000101010000000000100000001 – 32 unbroken bits, good for direct integer comparison. Hex pairs: C0.A8.01.01 – compact and matches network packet displays. Decimal: 192.168.1.1 – round-trip for sanity-checking.
Can I batch many IPs at once?
Yes – one per line. The tool processes thousands in under 50 ms. Invalid lines (bad octet, missing dots, prefix > 32) are flagged in red in the breakdown but don’t abort the batch; the valid lines all convert successfully.
What’s CGNAT and why is 100.64.0.0/10 special?
Carrier-Grade NAT (RFC 6598) – a range ISPs use when they’ve run out of public IPv4 addresses and need to NAT customers behind their own infrastructure. It’s not officially “private” like RFC 1918 ranges but acts similarly. If you see 100.64.x.x on your home router’s WAN side, your ISP is doing CGNAT.
Are class A/B/C distinctions still meaningful?
For routing: no – CIDR (1993) replaced classful routing entirely, and most modern networks use variable-length prefixes. For exam purposes and legacy diagnostic tools: yes. The class still tells you the first-octet bit pattern, which is a quick mnemonic for “is this address in the 0-127 range?” etc.
Is my data uploaded?
No. All math runs in your browser – packing octets into a 32-bit integer, range-checking against the special table, building the binary string. No fetch, no XHR, no analytics. Open DevTools → Network and watch zero requests fire after the page loads.
Related Tools
Binary to IP Converter →
Convert 32-bit binary to IPv4 or 128-bit binary to IPv6 - with classification, canonical…
Calculate Bitwise AND of Binary Values →
Calculate Binary Values Online Free - Fast and accurate binary computations for developers, students,…
Binary to Decimal Converter →
Convert extremely large machine binary strings natively into format decimal bounds infinitely fast offline…
Calculate Binary Addition →
Calculate Binary Addition numbers with carry visualization and multi-format output. Free, offline, client-side, instant…
Binary to Gray Code Converter →
Convert binary to Gray code (BRGC) - XOR algorithm, bit-width preserved, step-by-step display, BigInt.…
Binary to Image Converter →
Render binary as a pixel image - multiple color schemes, pixel scaling, PNG export,…
Binary to IPv6 Converter →
Convert 128-bit binary to IPv6 addresses - RFC 5952 canonical form, special-range detection. Free,…
Binary to Negabinary Converter →
Convert binary to negabinary (base -2) - handles signed input, BigInt precision, no sign…
Convert Binary to Octal →
Convert binary to octal (base 8) - 3-bit grouping, prefix options, BigInt precision, batch…
Binary to String Converter →
Decode binary to text - UTF-8, Latin-1, or 7-bit ASCII, auto-detect format, handle emoji.…
Convert Decimal to Binary →
Convert decimal numbers to binary instantly, one value or a whole list at a…
Convert Gray Code to Binary →
Decode Gray code (reflected binary) to standard binary, decimal, or hex. BigInt-safe, per-line errors,…