Text to 8-bit binary and binary back to readable text
Number Base Converter
Convert a number between bases, however long it is, and see how the conversion works.
Loading tool…
How to use number base converter
Choose the base you are converting from.
Type or paste the number. A matching 0b, 0o or 0x prefix is fine.
Read it in binary, octal, decimal, hex and a base of your choice.
Turn on grouping for readability, and copy any result.
What this tool does
- Any base from 2 to 36, using 0 to 9 then A to Z.
- Numbers up to 20,000 digits, converted exactly.
- Two's complement bit patterns at 8, 16, 32 and 64 bits for negative numbers.
- Positional expansion and repeated division steps for numbers up to 64 bits.
- Points to the exact digit that is not valid in the chosen base.
How the result is verified
Converting a result back to the original base gives the input again (minus any leading zeros). The decimal digit and bit counts under the results let you check the size.
Frequently asked questions
How do I convert binary to decimal by hand?
Multiply each digit by 2 raised to its position, counting from 0 on the right, and add. 1011 = 1 x 8 + 0 x 4 + 1 x 2 + 1 x 1 = 11. The steps panel shows this for your number.
Why does -5 show as 11111011?
That is the 8-bit two's complement, the way computers store negative integers: invert the bits of 5 (00000101 becomes 11111010) and add 1. The plain binary of -5 is just -101.
Is my data uploaded to a server?
No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.
Related tools
Text to hex bytes and hex back to text, in five output styles
Numbers to Roman numerals and back, with strict validation and explanations
Numbers in English words, ordinals and money, international or lakh/crore
a mod n three ways (JS %, Python %, Euclidean) plus modular powers