IP to Binary Converter

Convert an IPv4 address to binary, hex and decimal.

Convert any IPv4 address to its 32-bit binary form, plus hexadecimal and the decimal integer. Runs entirely in your browser — nothing is uploaded. It runs free in your browser on Gera Tools, with nothing uploaded.

Last updated Source: Gera Tools

How is an IPv4 address converted to binary?

Each of the four octets (0–255) is written as an 8-bit binary number, so the whole address becomes 32 bits. For example 192 is 11000000.

IPv4 to binary, hex and decimal

Enter any IPv4 address and see it as binary (per octet and as one 32-bit string), hexadecimal, and the decimal 32-bit integer that the address represents internally. This is useful for studying subnetting, debugging firewall rules, and understanding how masks line up bit by bit.

How it works

An IPv4 address is four octets, each 0–255. The converter writes each octet as an 8-bit binary number and concatenates them into a 32-bit string, also showing the two-digit hex form per octet. The single decimal integer is computed as:

octet1 × 16,777,216 + octet2 × 65,536 + octet3 × 256 + octet4

(that is, octet1 × 2²⁴ + octet2 × 2¹⁶ + octet3 × 2⁸ + octet4).

Example

For 192.168.1.10:

FormatValue
Per octet binary11000000.10101000.00000001.00001010
32-bit binary11000000101010000000000100001010
HexadecimalC0A8010A
Decimal integer3,232,235,786

Everything runs in your browser; nothing is uploaded.

Why binary makes subnetting visible

When you look at a subnet mask like 255.255.255.0 in decimal, it tells you almost nothing about which host bits it covers. Convert it to binary — 11111111.11111111.11111111.00000000 — and the split becomes literal: a continuous run of 1s marks the network portion, and the trailing 0s mark the host portion. Aligning an address’s binary with its mask makes it easy to see which addresses share a network and which don’t, and to verify that a /24 boundary falls exactly where you expect.

Reading the hexadecimal output

Each octet converts to exactly two hex digits (00FF). This notation is common in low-level network and kernel code, packet captures (Wireshark displays IP addresses in hex internally), and some firewall rulesets. For example:

  • 192C0
  • 168A8
  • 101
  • 100A

The full address 192.168.1.10 is C0A8010A, which is how it appears in many C structs and in the raw bytes of an IP packet header.

The decimal integer and why tools use it

Storing IP addresses as 32-bit integers is far more compact than storing the dotted-decimal string. Databases, CDN configurations, and routing tables frequently use integer representation for range comparisons — checking whether an address falls inside a CIDR block is a simple integer comparison once both endpoints and the address are in integer form. Knowing what integer your IP maps to helps you interpret those queries and confirm that your CIDR arithmetic is correct.

Common addresses to try

AddressNotes
192.168.0.1Typical home router default gateway
10.0.0.1Common private network gateway (RFC 1918)
172.16.0.1Second RFC 1918 private block start
255.255.255.0Standard /24 subnet mask in binary
127.0.0.1Loopback (localhost)
0.0.0.0Unspecified / any-address