Binary, Hex and Decimal Converter
Convert between bases, one number per line.
Auto detects 0x and 0b prefixes.
Everything is processed in this tab. Nothing you paste is sent anywhere.
Every tool runs entirely in your browser. Your files are never uploaded to a server.
A base is how many digits a system uses before it carries. Decimal has ten, binary two, hexadecimal sixteen. The number itself does not change — 255, 0xFF and 0b11111111 are the same value written three ways.
How to use Number Base Converter
- Paste your numbers. One per line. Prefixes 0x, 0b and 0o are detected automatically.
- Read all four bases. Decimal, hexadecimal, octal and binary for each input.
About converting number bases
A number base is a notation, not a property of the number. Two hundred and fifty five is the same quantity whether written 255, 0xFF or 0b11111111; only the representation changes. Computing settled on hexadecimal because sixteen is a power of two, so every hex digit corresponds exactly to four bits and a byte is always exactly two digits. That alignment is what makes hex readable as a bit pattern in a way decimal never is — 0xF0 is visibly the top four bits set, while 240 tells you nothing. Octal survives mainly in Unix permissions, where three permission bits map cleanly to one digit, which is why chmod takes numbers like 755 and 644. Its wider use faded partly because the C convention of a leading zero meaning octal produced a long tail of bugs when people wrote zero-padded decimals. The implementation detail that matters here is precision. Converting through an ordinary floating-point number loses exactness above 2^53, which quietly corrupts 64-bit identifiers, memory addresses and long bitmasks — the very things people convert bases for. Using arbitrary-precision integers avoids it entirely, and it is why the results here are exact at any size.
Frequently asked questions
Why is hexadecimal used so much in computing?
Are very large numbers handled correctly?
What do the 0x and 0b prefixes mean?
Why does octal still exist?
Last updated