HEX to Binary Converter
Every hex digit maps to exactly 4 bits, so hex-to-binary is the cleanest base conversion you can do. Paste one or many hex values and this tool produces the binary string with each digit expanded to a zero-padded 4-bit nibble, handy for bitfield documentation, firmware registers and low-level debugging.
How to convert hex to binary
-
1
Paste hex input
Type any mix of 0-9 and a-f; prefixes like `0x` and any separators are removed automatically.
-
2
Each digit becomes 4 bits
Every hex digit is expanded to its 4-bit binary equivalent, so the output is always 4 bits per digit.
-
3
Leading zeros are always kept
Every nibble keeps its full 4 bits so byte boundaries stay aligned; there is no trimming option.
-
4
Copy the binary
The output is a pure `0/1` string grouped in 4-bit nibbles, ready to paste into documentation, firmware comments or a calculator.
The hex-to-binary mapping
Hex is a compact view of binary: 2 hex digits = 1 byte = 8 bits. Mentally translating between them is fast because each hex digit covers exactly 4 bits.
Nibble lookup table
| Hex | Binary | Decimal |
|---|---|---|
| 0 | 0000 | 0 |
| 1 | 0001 | 1 |
| 2 | 0010 | 2 |
| 3 | 0011 | 3 |
| 4 | 0100 | 4 |
| 5 | 0101 | 5 |
| 6 | 0110 | 6 |
| 7 | 0111 | 7 |
| 8 | 1000 | 8 |
| 9 | 1001 | 9 |
| A | 1010 | 10 |
| B | 1011 | 11 |
| C | 1100 | 12 |
| D | 1101 | 13 |
| E | 1110 | 14 |
| F | 1111 | 15 |
So 0x2F becomes 0010 1111.
Why 4-bit grouping matters
Engineers reading an STM32, AVR or RISC-V reference manual expect registers in 4-bit groups. Grouping makes it obvious that 0x8001 has the MSB and LSB set and nothing in between.
Byte order and prefixes
0xis a C-style hex prefix;&His older BASIC;$is used in 6502 assembly. The converter strips all three, and any other non-hex characters such as spaces, dashes or colons.- Binary output is always most-significant-bit first, network byte order. If your target is little-endian, swap the bytes before you lay them out.
- Every hex digit always emits its full 4 bits, so a 32-bit register value always comes out as 32 bits. There is no leading-zero trimming to turn on or off.
Frequently Asked Questions
No. 0xFF, 0xff and 0xFf all convert to the same 11111111. The converter treats upper- and lower-case letters the same.
This converter works on the magnitude only: a leading - is a non-hex character, so it is removed and -0x01 converts to 0000 0001 just like 0x01. For two’s-complement or signed output, use a dedicated signed-number tool.
Yes. Separate them with spaces or newlines and the converter strips the separators: 2A 3B produces 0010 1010 0011 1011. Note the output is one continuous stream, so the boundaries between your input values are not preserved.
Yes. Every hex digit always emits its full 4 bits with leading zeros kept, so a 32-bit register value such as 0x80010000 comes out as 1000 0000 0000 0001 0000 0000 0000 0000, with byte boundaries always aligned.
Related Tools
ASCII Table Reference
Full ASCII table from 0 to 127 with decimal, hex, octal, binary, standard names and HTML numeric-reference notation, including NUL, LF and DEL.
Color Palette Generator
Generate monochromatic, analogous, complementary, triadic or tetradic color palettes from a base HEX color and export copy-ready CSS variables.
HEX Color Picker
Pick or enter a HEX colour and get RGB, HSL, approximate CMYK, relative luminance and contrast ratios against white and black.
HTML Character Reference
Searchable list of HTML entities, their named and numeric codes, and a one-click copy for special characters and symbols.
FPS Counter
Measure browser FPS with requestAnimationFrame, smoothing, min/max frame rate, warnings and an optional graph. Runs locally with no upload or API.
JSON Formatter
Paste JSON to pretty-print with 2 or 4 spaces, minify it to compact output, or run a quick syntax check before copying the result.
Tool available in other languages
- เครื่องแปลง HEX เป็นไบนารี [TH]
- HEX zu Binär-Konverter [DE]
- Konwerter HEX na binarny [PL]
- Convertidor de HEX a Binario [ES]
- Konverter HEX ke Biner [ID]
- HEX naar Binair Converter [NL]
- Chuyển đổi từ HEX sang nhị phân [VI]
- HEX till binär konverter [SV]
- HEX-바이너리 변환기 [KO]
- 16進数→2進数変換ツール [JA]
- Conversor HEX para Binário [PT]
- محوّل من النظام السداسي عشر (HEX) إلى النظام الثنائي [AR]
- Convertisseur HEX en binaire [FR]
- Convertitore da HEX a Binario [IT]
- Конвертер HEX в двоичный код [RU]
- HEX'ten İkiliye Dönüştürücü [TR]
- 十六进制到二进制转换器 [ZH]