Tools / Binary to Hex
Binary to Hex Converter
Convert between binary, octal, decimal, and hexadecimal in one place: paste a value in any base and get every other representation instantly.
Status
Length: 9 digits
- Binary: Base-2 bits (0/1) representing powers of two.
- Octal: Base-8 digits (0-7) grouping bits in threes.
- Decimal: Base-10 digits, standard numeric notation.
- Hexadecimal: Base-16 digits (0-9, A-F) grouping four bits.
Converted values
Binary (grouped)
0001 1110 0000
Octal
740
Decimal
480
Hexadecimal
1E0
How it works
Groups of four binary digits map directly to a single hex digit (0-9, A-F), making conversion a matter of splitting the binary string into nibbles and looking each one up.
Challenges solved with this tool: picoCTF 2024 - Binhexa.
Every hex digit (0--9, A--F) corresponds to exactly four binary digits (a nibble). This one-to-one mapping makes the conversion purely mechanical: split the binary string into groups of four from the right, pad the leftmost group with leading zeros if needed, then replace each group with its hex equivalent. For example, 1010 1111 becomes AF. Going the other way, expand each hex character into exactly four bits.
In CTF challenges you will frequently need to switch between binary and hex when reading memory dumps, inspecting network packets, or tracing assembly code. Hex is compact (one character per four bits), while binary makes bit-level patterns immediately visible. Having both representations side by side helps you spot masks, flags set in status registers, or magic bytes in file headers.
Octal (base 8) groups three binary digits per digit, which maps neatly to Unix file permission bits. The classic permission string 755 translates to binary 111 101 101, which shows read-write-execute for owner and read-execute for group and others. CTF forensics challenges sometimes give you raw octal output from stat or similar tools that you need to interpret at the bit level.
When a binary string is not a multiple of four bits long, this tool pads it on the left with zeros before converting, matching the behavior of most programming languages and assemblers. Always confirm the bit width expected by the challenge - some require an exact 8-bit (byte), 16-bit, or 32-bit representation.