Programmers read hex, hardware people think in binary, file permissions use octal, and everyone else uses decimal. This tool converts a number between binary, octal, decimal, hexadecimal, base 32, base 36 and any other base up to 36, with exact arithmetic for very large values and support for negatives.
How to use it
- Type your number.
- Tell the tool which base it's written in.
- Optionally pick an extra base to display.
- Read all the conversions at once and copy the one you need.
When it helps
- Reading memory addresses and colour codes in hex.
- Checking binary arithmetic for a computing course.
- Converting between decimal and octal file permissions.
- Decoding identifiers written in base 32 or base 36.
Good to know
- Prefixes like 0x, 0b and 0o are accepted when they match the base you chose.
- Spaces, commas and underscores in the number are ignored, so you can group digits for readability.
- Letters above 9 aren't case sensitive, so ff and FF are the same hex number.
How bases work
Every positional number system has a base: the number of digits it uses. Decimal uses ten, binary two, octal eight, hexadecimal sixteen. Each digit's value depends on its position, so 255 in decimal means 2 hundreds, 5 tens and 5 ones, while FF in hex means 15 sixteens and 15 ones, which is also 255.
To convert, the tool reads your digits into an exact whole number and then writes it out in each other base by repeatedly dividing. It uses arbitrary-precision arithmetic, so even a 300-digit number converts without rounding.
Worked example: reading a colour code
The colour #F6B82F is made of three hex pairs: F6, B8 and 2F. Convert each: F6 is 246, B8 is 184 and 2F is 47. So the colour is rgb(246, 184, 47). Enter F6 with base 16 and the decimal line says 246, which is exactly the red value.
In binary, 246 is 11110110, which shows how a byte, eight bits, holds a value from 0 to 255. That's why each colour channel has 256 levels.
Why programmers like hex and octal
Hexadecimal is compact: every four bits are exactly one hex digit, so a byte is two digits and memory addresses stay short. Octal groups bits in threes, which is why Unix file permissions are written like 755: three digits, each from three bits meaning read, write and execute.
Base 32 and base 36 appear in identifiers and short links, since they pack more information into fewer characters. Base 36 uses all the digits and letters, so a number such as 1,000,000 becomes just LFLS.
Common pitfalls
Leading zeros can change meaning in some languages. In JavaScript, a number starting with 0 may be read as octal in older code. Another trap is case: hex digits are not case-sensitive, but some systems require uppercase, so check what your target expects.
Negative numbers in computers use two's complement, which looks very different in binary from a simple minus sign. This tool shows the sign separately, so it won't match what you'd see in a processor register.
Questions
How do I read a hex colour in decimal?
Convert each pair of digits on its own; FF is 255.
Why does it reject a digit?
Each base allows only certain digits. Binary takes 0 and 1, octal takes 0 to 7.