Binary / Decimal / Hex Converter
Convert a number between binary, decimal, hexadecimal and octal.
How to use
- Type a value.
- Choose which base you entered it in.
- Copy the decimal, binary, hex or octal result.
How the Binary / Decimal / Hex Converter works
Converts between binary, decimal and hexadecimal — the three bases that come up constantly in programming, networking and low-level debugging.
Every base is positional: each digit is multiplied by the base raised to its position. Hexadecimal is convenient because one hex digit maps to exactly four binary digits.
binary base 2 (0-1) · decimal base 10 (0-9) · hex base 16 (0-9, A-F)
1 hex digit = 4 bits · 2 hex digits = 1 byte
Worked example
255 is 11111111 in binary and FF in hex — the largest value a single byte holds.
Things worth knowing
- Useful anchors: 8 bits = 1 byte = 0–255 = 0x00–0xFF. 1024 is 2¹⁰. 65535 is the 16-bit maximum.
- Colour codes are hex bytes: #FF0000 is red at full intensity with no green or blue.
- Prefixes signal the base in most languages: 0b for binary, 0x for hex.
Frequently asked questions
What is hexadecimal?
Base 16, using 0–9 and A–F — common in programming for colors and memory addresses.
Does it handle negative numbers?
It's designed for non-negative integers; enter positive values for clean conversions.
Why do programmers use hexadecimal?
It maps cleanly onto binary — one hex digit is exactly four bits — so it expresses byte values compactly without hiding the bit structure.
How do I convert binary to hex quickly?
Group the bits in fours from the right and translate each group. 11111111 is 1111 1111, which is F F.