Binary to Hex Converter
Turn bit patterns into hexadecimal digit by digit, keeping every leading zero so the width of the value is preserved.
Processed locally in your browser/ Your data stays in your browser.
What is Binary to Hex Converter?
Every four binary digits (a nibble) map to exactly one hexadecimal digit: 1111 is F, 1010 is A, 0001 is 1. That is why hex is the compact way to write bit patterns. This tool pads the input to a multiple of four bits and converts each nibble, without any size limit.
Unlike a numeric conversion, it can keep leading zeros, so 00000001 becomes 01 and not 1. You can group the hex output by bytes, add a 0x prefix, choose uppercase and pad to 1, 2, 4 or 8 bytes. Spaces, underscores and a 0b prefix in the input are ignored.
How does it work?
- Paste one binary value per line, for example 1111 0000 1010 0101.
- Keep “Keep leading zeros” on to preserve the bit width, or turn it off for the shortest hex value.
- Choose byte grouping, the 0x prefix, uppercase and padding.
- Copy the hex output; a single value also shows the decimal number and bit length.
Common use cases
- Writing a bit mask or register value in the hex form used in datasheets.
- Compacting long bit strings into hex for logs and documentation.
- Checking hand conversions in digital-logic or embedded-systems exercises.
- Converting binary protocol fields into hex bytes.
Examples
Try this input in the tool above:
11110000 10100101 0b1010 00000001
F0A5 A 01
Privacy
Binary to Hex Converter runs entirely in your browser. The text or files you provide are processed on your device and are not uploaded, logged or stored on our servers.
Limitations
Input must contain only 0 and 1 (plus ignored separators). If the number of bits is not a multiple of four, the pattern is left-padded with zeros. Negative sign is kept as a plain minus in front, not as two’s complement.
Frequently asked questions
How do I convert binary to hex by hand?
Split the bits into groups of four from the right and replace each group with its hex digit: 1111 0000 becomes F0.
Why keep leading zeros?
They carry the width of the value: 0000 0001 is one full byte, 01 in hex. Dropping them gives 1, which loses that information.
Is there a length limit?
No practical limit. Bit strings with thousands of digits convert instantly.
Related tools
Hex to Binary Converter
Expand hexadecimal values into their exact bit patterns, four bits per digit, with optional grouping and padding.
Developer Tools
Binary to Decimal Converter
Read binary as a decimal number, either as a plain unsigned value or as a signed two’s complement integer.
Developer Tools
Decimal to Hex Converter
Turn decimal integers into hexadecimal, with byte grouping, a 0x prefix and fixed-width two’s complement for negative values.
Developer Tools
Base Converter (Base 2 to 36)
Type a number, pick its base and the base you want, and get an exact result with a quick view in binary, octal, decimal, hexadecimal and base 36.
Developer Tools
Text to Hex Converter
See the exact bytes behind any text, from a quick "Hello" to emoji, formatted the way your code or debugger expects.
Encoding & Decoding
Text to Binary Converter
Turn words into ones and zeros: each byte of your text is shown as eight bits.
Encoding & Decoding
Decimal to Binary Converter
Turn decimal integers into binary, including negative numbers as two’s complement at the bit width you need.
Developer Tools