Binary → hexadecimal
Type a binary number — 0s and 1s only, up to 64 bits — and get the hex value, the decimal value, and the 4-bit nibble grouping that makes the conversion click.
CONVERTER · MATH · NUMBER SYSTEMS
101101 in binary is 0x2D in hex, which is 45 in decimal — group the bits in fours (0010 1101) and read each nibble as one hex digit. Convert either direction below: binary → hex with the nibble grouping shown, or hex → binary, each with the decimal value alongside.
Type a binary number — 0s and 1s only, up to 64 bits — and get the hex value, the decimal value, and the 4-bit nibble grouping that makes the conversion click.
Type a hex value — digits 0–9 and A–F, upper or lower case, with or without the 0x prefix, up to 16 digits — and get the binary expansion plus the decimal value.
Pad the binary to a multiple of 4 bits, split into nibbles, and read each nibble as one hex digit (0000=0 … 1001=9, 1010=A, 1011=B, 1100=C, 1101=D, 1110=E, 1111=F). For 101101: pad to 00101101, split into 0010 | 1101, read 2 | D → 0x2D. Check: 2×16 + 13 = 45. Going the other way, expand each hex digit to 4 bits: 0xFF → 1111 1111 = 255.
Setup: convert binary 101101 to hexadecimal (and decimal).
Pad to fours. 101101 is 6 bits — pad on the left to 8: 00101101. Leading zeros change nothing about the value; they just complete the last nibble.
Split into nibbles. 0010 | 1101 — two groups of four, read left to right.
Read each nibble. 0010 = 2, 1101 = 13 = D. So 0x2D.
The decimal check. 2×16 + 13 = 32 + 13 = 45 — or from the bits directly: 32 + 8 + 4 + 1 = 45.
Branch — hex FF to binary: F = 1111, so 0xFF → 1111 1111 = 15×16 + 15 = 255 — the biggest value one byte can hold.
Branch — binary 1010: already 4 bits — one nibble, 1010 = A = 10 in decimal. This is the nibble people memorize first.
Branch — invalid input: “102” is rejected — “2” is not a binary digit. “GG” is rejected as hex — “G” is not a hex digit. The converter names the offending character so you can fix it.
| Output | Formula | What it means |
|---|---|---|
| Hexadecimal value | each 4-bit nibble → one hex digit | 0x2D at the defaults — the compact form of the bits. |
| Decimal value | ∑ digit × 16position | 45 at the defaults — the everyday number. |
| Nibble grouping | pad to a multiple of 4, split in fours | 0010 1101 at the defaults — the visual proof of the conversion. |
| Binary expansion | each hex digit → 4 bits | 11111111 for 0xFF — hex is just shorthand for binary. |
The math is exact: conversion runs on arbitrary-precision integers (BigInt), correct up to the 64-bit cap (16 hex digits / 64 binary digits) — there is no floating-point anywhere, so even 264−1 converts perfectly. Hex output is uppercase (0x2D, not 0x2d); input accepts either case. Leading zeros are preserved in the nibble display (0010 1101) but dropped from the hex value itself (0x2D, not 0x002D) — same number, cleaner notation. The converter handles unsigned integers only: no negatives, no fractions, no two’s-complement interpretation — prefix a minus sign and it will be rejected as an invalid character.
Bright Side Kit. "Binary to Hexadecimal." https://brightoolbox.com/binary-to-hexadecimal/ Accessed October 23, 2026.Because 24 = 16: one 4-bit group (a nibble) holds exactly the values 0–15, which is exactly one hex digit’s range. That makes nibbles the natural bridge — no arithmetic needed, just a 16-row lookup you memorize in a day.
Everywhere computers meet humans: color codes (#FF5733 — two hex digits each for red, green, blue), memory addresses (0x7FFF…), MAC addresses (AA:BB:CC:DD:EE:FF), Unicode code points (U+1F600), and error codes (0x80070005). Hex is compact — two digits per byte — and maps cleanly to bits, which decimal doesn’t.
No. 0x2D and 0x2d are the same number; A–F and a–f are interchangeable everywhere. This converter accepts both and outputs uppercase by convention.
It’s the programming convention for “hex follows” — 0x2D means hex 2D, as opposed to decimal 2 or the identifier “2D”. You’ll also see “#” for colors and “U+” for Unicode. The converter accepts the 0x prefix but doesn’t require it.
Positional notation, base 16: for 0x2D, it’s 2×161 + 13×160 = 32 + 13 = 45. For longer values keep going left: each position is worth 16× the one to its right (1, 16, 256, 4096…). A=10, B=11, C=12, D=13, E=14, F=15 — that’s the whole table.
Because hex talks to bits and decimal doesn’t. One hex digit is exactly 4 bits, so 0xFF instantly reads as “eight ones” — while 255 gives you no bit intuition at all. Decimal is for humans counting; hex is for humans reading machine state.