Number base converter (binary, octal, decimal, hex)
Convert numbers between binary, octal, decimal and hexadecimal. Enter the value and its base.
Use letters A–F for hexadecimal. Each digit must be valid in the chosen base.
How the calculation works
Each base uses its own set of digits: binary (0–1), octal (0–7), decimal (0–9) and hexadecimal (0–9 and A–F). The value is first converted to decimal and then rewritten in each base.
Example: FF in hexadecimal = 255 in decimal = 11111111 in binary.
Examples
- 255 (decimal) = FF (hex) = 11111111 (binary).
- 10 (decimal) = A (hex) = 1010 (binary) = 12 (octal).
Frequently asked questions
Why does hexadecimal use letters?
Base 16 needs 16 symbols. After 9, the letters A, B, C, D, E and F represent 10 through 15.
Why does computing use binary and hex?
Binary reflects hardware bits (on/off); hex is a compact way to write binary (each hex digit = 4 bits).
How to convert hex to decimal mentally?
Multiply each digit by the power of 16 for its position. E.g. 2F = 2×16 + 15 = 47.
Related calculators
More Tech / IT calculators
See all →Download time
Calculate how long a file takes to download at your internet speed.
Password strength
Estimate password entropy (bits) and crack time from length and character types.
Aspect ratio
Find the aspect ratio (e.g. 16:9) of an image or screen and resize keeping the proportion.
Password generator
Create strong, random passwords with the length and character types you choose. Generated in your browser — nothing is sent.
Pixel density (PPI)
Calculate a screen's pixels per inch (PPI) from its resolution and diagonal size.
Uptime / SLA
Find out how much downtime an uptime SLA allows per year, month, week and day.
Color contrast (WCAG)
Calculate the contrast ratio between two colors and see if it passes WCAG accessibility criteria.
Updated on June 30, 2026 · by Rafael Rossi · Methodology & sources