Binary to HEX
Convert binary strings to hexadecimal format.
Convert binary to hexadecimal. Every four bits become one hex digit, so 1111 0101 becomes F5. Paste binary with or without spaces; if the number of bits isn't a multiple of four, zeros are added at the front, which doesn't change the value. Choose uppercase or lowercase hex. Because the conversion is digit by digit, it works for any length without rounding, from one byte to a long bit string.
Need the reverse? HEX to Binary
Common use cases
- Shorten a long binary value for documentation or code
- Convert register values or bit masks while debugging
- Check number-system homework
- Turn binary from a datasheet into the hex used in code
How to use
- Paste the binary.
- Choose uppercase or lowercase.
- Copy the hex value, or use the link to convert hex back to binary.
FAQ
Why do programmers use hex instead of binary?
Hex is four times shorter and maps exactly onto bits: each digit is four bits and two digits are a byte. 11111111 is just FF.
Does it work for very long values?
Yes. Each group of four bits is converted on its own, so length doesn't matter.
How do I convert to decimal?
Use the base-N number converter, which converts between binary, octal, decimal, hex and other bases.
Related tools
- HEX to BinaryConvert hexadecimal strings to binary format.
- Binary to TextConvert binary code to readable text characters.
- HEX to Base64Convert hexadecimal strings to Base64 encoding.
- Base64 to HEXConvert Base64 strings to hexadecimal format.
- Query String BuilderBuild URL query strings from key-value pairs.
- JWT Signer DemoCreate signed JSON Web Tokens for testing: write the claims, pick HS256, HS384 or HS512, add an expiry, and…
- Base-N Number ConverterIn Calculators