Interactive toolConversion & IPv6EN master
ToolConversionBinary / Hex

Decimal ↔ Binary ↔ Hex Converter

Convert unsigned values between decimal, binary and hexadecimal in 8, 16 or 32 bits, with automatic padding and range validation.

Practical modeEnter your data and review the result

Decimal ↔ Binary ↔ Hex

Unsigned conversion in 8, 16 or 32 bits with automatic padding.

Understand the result

What this tool calculates and how to interpret the result.

Convert decimal, binary and hexadecimal values in one place

This converter lets you enter one unsigned value as decimal, binary or hexadecimal and immediately obtain the equivalent representations. Choose an 8-, 16- or 32-bit width, enter exactly one value, and the tool validates the number against the selected range before showing padded and unpadded output.

It is especially useful when studying subnetting, masks, wildcard values, protocol fields or low-level troubleshooting. If you are reviewing IPv4 addressing, pair it with the IP addressing guide and the subnetting guide.

How to use the base converter

Select the bit width first. Then type a value in only one of the three fields: decimal, binary or hexadecimal. Press Convert and the tool fills the equivalent values. If more than one input field contains data, the calculator asks you to keep only one source so there is no ambiguity about which representation should be authoritative.

The bit width defines the allowed unsigned range. Eight bits cover 0–255, sixteen bits cover 0–65,535, and thirty-two bits cover 0–4,294,967,295. Binary and hexadecimal inputs are also checked so they cannot exceed the selected width.

Example: decimal 192 in 8 bits

The decimal value 192 becomes binary 11000000 and hexadecimal C0. In an IPv4 address, 192 is a common octet and this representation makes the underlying bit pattern visible. The first two binary weights, 128 and 64, are set, while the remaining six bits are zero.

For a complete IPv4 address rather than one number, use the IP ↔ binary converter or the IP ↔ hexadecimal converter.

Why padding matters

A numeric value does not change when leading zeros are added, but fixed-width representations are much easier to compare. Decimal 5 can be written as binary 101, yet in an 8-bit octet it is usually clearer as 00000101. Likewise, hexadecimal A becomes 0A when representing one complete byte.

Padding is useful in exercises, packet-field analysis and documentation because every value occupies the same visual width. The tool therefore shows both the padded representation and the compact form.

How binary and hexadecimal relate

Each hexadecimal digit represents exactly four binary bits. That means one byte can be represented by eight binary digits or two hexadecimal digits. For example, binary 11111111 equals hexadecimal FF and decimal 255.

This relationship is why hexadecimal is common in networking: it is much shorter than binary while still mapping cleanly to groups of bits. IPv6 notation relies heavily on hexadecimal for the same reason. Review the IPv6 guide when you want to see that representation at address scale.

Unsigned range and overflow

The converter treats values as unsigned integers. An 8-bit field therefore cannot hold decimal 256 because all 256 available bit patterns are already used by values 0 through 255. Choosing a larger width increases the maximum value but does not change the numeric meaning of an input that already fits.

Range validation is important when translating protocol fields or octets. A value may be syntactically valid hexadecimal while still being too large for the width you selected.

Frequently asked questions

Can I enter negative numbers?

No. This tool is intentionally for unsigned values used in common networking exercises and field conversions.

Does adding leading zeros change the value?

No. Padding changes only the representation, not the numeric value.

Why are there 8-, 16- and 32-bit modes?

They cover one-byte IPv4 octets and larger values while keeping range validation explicit.

Can I use lowercase hexadecimal?

Yes. Input is case-insensitive and the result is normalized to uppercase for readability.

Next step

Use this converter to build intuition about bit patterns, then move to the IP-specific binary and hexadecimal tools when you want to inspect all four IPv4 octets together.