Type any number and see its binary, octal, decimal, and hex representations instantly. Pick any input base, explore custom bases up to 36, and inspect individual bits in the colour-coded viewer.
Try:
Decimal (Base 10) copy
—
Binary (Base 2) copy
—
Octal (Base 8) copy
—
Hex (Base 16) copy
—
Bit viewer
—
How to use
Select your input base using the BIN / OCT / DEC / HEX chips.
Type a number — all four representations update instantly below.
Click any result box to copy it to clipboard.
The Bit viewer shows each nibble (4 bits) colour-coded, with its hex value. Toggle between 8, 16, and 32-bit display.
The Signed row shows the two's complement interpretation — useful for understanding negative values in registers.
Set any Custom base (2–36) to convert into base-32, base-36, and more.
Frequently Asked Questions
How do I convert binary to decimal?
Each binary digit represents a power of 2 from right to left. Multiply each bit by its power and sum. For example, 1101 = 1×8 + 1×4 + 0×2 + 1×1 = 13.
How do I convert decimal to hexadecimal?
Divide by 16 repeatedly, recording remainders. Remainders 10–15 map to A–F. Read remainders bottom to top. Example: 255 → FF. Or just use this tool.
What is a nibble?
A nibble is 4 bits — half a byte. Each hex digit maps to exactly one nibble. The byte 11001010 splits into 1100 (C) and 1010 (A) → 0xCA.
What is two's complement?
The standard way CPUs represent negative integers. If the most significant bit is 1, the signed value is unsigned − 2^n. So 0xFF in 8-bit = 255 unsigned = −1 signed.
What custom bases are useful?
Base 32 is used in TOTP (authenticator codes) and some ID systems. Base 36 uses 0–9 + A–Z and is common in URL shorteners. Base 62 (not supported here, needs lowercase) is used in YouTube-style IDs.
Why is hex used in programming?
Each hex digit = exactly 4 bits. Memory addresses, colour codes, byte values, and bitmasks are all more readable in hex than binary. 0xFF is far easier to scan than 11111111.
Did you know?
Early computers used octal (base 8) as their shorthand for binary — octal was dominant before hex took over in the 1970s when 8-bit bytes became standard (3 bits per octal digit doesn't divide evenly into 8).
The 0x prefix for hexadecimal came from the C programming language in 1972 and is now universal across virtually every programming language.
Base 60 (sexagesimal), invented by the Babylonians over 4,000 years ago, is still alive today — it's why an hour has 60 minutes and a minute has 60 seconds.