IP to Binary Converter

Convert IPv4 and IPv6 addresses to binary, hexadecimal, and decimal formats. Calculate subnet masks, network addresses, and CIDR notation.

Quick examples:

Binary format:

Network Address Converter

Convert IP addresses between binary, decimal, and hexadecimal formats. This tool supports both IPv4 and IPv6, with advanced subnet calculations including network addresses, broadcast addresses, and CIDR notation.

IP Address Converter

Why Use This Tool?

Multiple Formats

Convert between binary, decimal, and hexadecimal instantly.

Octet Breakdown

View each octet's binary, decimal, and hex values.

Subnet Calculations

Calculate subnet mask, network and broadcast addresses.

IPv4 & IPv6 Support

Works with both IPv4 and IPv6 address formats.

How this IP to Binary Converter works

This network utility converts IP addresses between decimal, binary, and hexadecimal representations while calculating subnet information for CIDR notation. The tool supports both IPv4 (32-bit) and IPv6 (128-bit) address formats, parsing input strings and validating each octet or hextet falls within valid numeric ranges before performing conversions. IPv4 octets must range 0-255, while IPv6 hextets must be valid hexadecimal values up to FFFF.

Binary conversion transforms each address component using positional notation, padding each IPv4 octet to 8 bits or IPv6 hextet to 16 bits for consistent display. The converter offers both dotted format (11000000.10101000.00000001.00000001) and continuous format (11000000101010000000000100000001) output options. Hexadecimal output uses uppercase notation with 0x prefix for decimal values, facilitating integration with programming contexts.

Subnet calculations apply CIDR prefix length to generate subnet masks through bit-level operations, computing network addresses by ANDing the IP with the mask, and broadcast addresses by ORing with the inverse mask. The tool displays usable host counts using 2^(32-CIDR)-2 formula, along with IP class detection for educational reference. All computations execute locally using JavaScript bitwise operations without server communication.

How to Use

1

Enter IP Address

Input any valid IPv4 or IPv6 address.

2

Set CIDR (Optional)

Specify subnet prefix length for network calculations.

3

View Conversions

See binary, hexadecimal, and subnet information.

Example Usage

Converting a common private IP:

Input
192.168.1.1/24
Output
11000000.10101000.00000001.00000001

Frequently Asked Questions

What is binary representation of an IP address?
An IP address is internally represented as binary numbers. IPv4 uses 32 bits (4 octets of 8 bits each), while IPv6 uses 128 bits (8 groups of 16 bits).
What is CIDR notation?
CIDR (Classless Inter-Domain Routing) notation indicates the number of bits used for the network portion. For example, /24 means 24 bits for network, 8 bits for hosts.
How do I calculate subnet mask from CIDR?
The CIDR value indicates how many leading bits are 1s. For /24, the binary is 11111111.11111111.11111111.00000000, which equals 255.255.255.0.
What are IP address classes?
IPv4 addresses are classified as Class A (1-126), Class B (128-191), Class C (192-223), Class D (224-239, multicast), and Class E (240-255, reserved).
Does this tool support IPv6?
Yes! Enter an IPv6 address in standard format (e.g., 2001:db8::1) and it will be converted to binary and hexadecimal representations.

Related Tools

The IP to Binary Converter is maintained by CodeItBro. We aim to provide the best free developer tools on the web. If you have feedback or suggestions, please visit our contact page.