Base Converter

Convert numbers between binary, octal, decimal, hexadecimal and other bases.

Enter a number in any base from 2 to 36 and see its equivalent in every other base. Useful when you're juggling hex colour codes, binary bit flags, octal file permissions, and decimal arithmetic in the same problem.

Common use cases: translating a colour from #A1B2C3 to RGB integer values, converting a permission bitmask to chmod notation, inspecting a hex memory address as binary to read individual flag bits, and double-checking boundary values when writing low-level code.

Frequently asked questions

Why does hexadecimal use letters A–F?
Hex is base 16, so it needs 16 distinct digits. Decimal only has 10 (0–9), so the remaining six are letters A through F representing values 10 through 15. FF is 255, 10 in hex is 16.
When would I actually use binary or octal in real code?
Binary literals (0b1010) are handy for bit-flag constants where each bit has a meaning. Octal mostly survives in Unix file permissions (chmod 755). Hex is everywhere — colour codes, memory addresses, RGB values, hash digests.
How do I convert in my head between hex and binary?
Each hex digit maps to exactly four binary digits. F = 1111, A = 1010. So 0xFA = 1111 1010. That's why hex is the universal shorthand for binary — much easier to read than the same value spelled out in bits.
What about negative numbers?
For unsigned conversions, negative inputs are rejected. For signed numbers in a fixed bit width, computers use two's complement — a topic this tool intentionally leaves to specialised calculators since the result depends on whether you're thinking 8, 16, 32 or 64 bits.