Binary to Hex Converter
Paste a binary value and get the matching hexadecimal value in uppercase. The converter keeps only 0 and 1, ignores everything else, and returns a plain hex result without prefixes, grouping, padding or validation warnings.
How to convert binary to hex
-
1
Paste the binary value
Spaces and separators are fine for readability. Any character other than `0` or `1` is ignored.
-
2
Keep only the bits
The input is cleaned down to one continuous binary string. If no binary digits remain, the result stays empty.
-
3
Convert the numeric value
Four bits correspond to one hex digit, but the conversion is value-based, so leading zeros do not survive.
-
4
Read the uppercase hex
The output is plain uppercase hexadecimal only. Add `0x`, byte spacing or fixed-width padding separately if you need that format.
Hex digit map
| Binary | Hex | Binary | Hex |
|---|---|---|---|
| 0000 | 0 | 1000 | 8 |
| 0001 | 1 | 1001 | 9 |
| 0010 | 2 | 1010 | A |
| 0011 | 3 | 1011 | B |
| 0100 | 4 | 1100 | C |
| 0101 | 5 | 1101 | D |
| 0110 | 6 | 1110 | E |
| 0111 | 7 | 1111 | F |
Worked example
Input: 1111 1010 0011 1100
Bits used: 1111101000111100
Hex output: FA3C
Leading-zero check: 00001111 returns F, not 0F.
When this converter is useful
- Quick value checks: turn a bit mask, register value or short payload into a compact hex value.
- Readable grouping: one hex digit represents four binary bits, so long values are easier to scan.
- Flexible pasted input: spaces, underscores, punctuation and labels are ignored, but any
0or1in that pasted text is still kept. - Modest inputs: for very long bitstrings, fixed word widths or arbitrary precision work, use a programmer calculator, CLI tool or arbitrary-precision library.
Frequently Asked Questions
They do not trigger an error. The converter removes every character except 0 and 1; for example, 0b1111 is treated as 01111, which has the same value as 1111.
00001111 and 1111 represent the same numeric value, so this converter returns F. It does not preserve byte width or add padding such as 0F.
No. The output is plain uppercase hexadecimal. If you need 0xFA3C, lowercase text or byte groups such as FA 3C, format the result after conversion.
No. It silently ignores non-binary characters instead of warning about them. Validate the input separately if invalid characters must be rejected.
Related Tools
Color Palette Generator
Generate monochromatic, analogous, complementary, triadic or tetradic color palettes from a base HEX color and export copy-ready CSS variables.
Random Color Palette Generator
Generate random color palettes from 2 to 15 swatches, choose a vibrant, pastel, muted or dark style, then copy HEX codes or CSS variables.
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.
HEX Color Picker
Pick any colour visually and get its HEX, RGB, HSL, HSV and CMYK values, plus accessibility contrast against white and black.
BBCode to HTML Converter
Convert BBCode (bulletin-board markup) to clean HTML. Handles formatting tags, lists, quotes, code, images, links and tables.
Random Color Generator
Generate 1 to 50 random HEX colors with swatches you can preview, copy and use in CSS, design tests or palette exploration.