Number Base Converter
Binary, octal, decimal, hex and any base 2–36 — plus text ↔ binary
Convert Between Binary, Decimal, Hex and Any Base
Type in any field — all others update instantly
Enter a number in any field – binary, octal, decimal, hexadecimal or a custom base from 2 to 36 – and every other representation updates as you type. Numbers can be as large as you like (the converter uses arbitrary-precision BigInt arithmetic) and may be negative. Spaces, underscores and the prefixes 0b, 0o and 0x are ignored, so you can paste values straight from code. Below the fields, the binary value is shown in groups of four bits with the hexadecimal digit for each group, plus the number of bits and bytes. Switch to “Text ↔ code” to turn any text into binary, hex, decimal or octal bytes (UTF-8, so accents and emoji work) or to decode such codes back into readable text.
Features
All bases at once
2, 8, 10, 16 and 2–36
Any size
BigInt, negatives included
Bit view
Nibbles with hex digits
Text ↔ binary
UTF-8 encode and decode
Quick Reference
Decimal = binary = hex
- 0 = 0000 = 0x0
- 5 = 0101 = 0x5
- 10 = 1010 = 0xA
- 15 = 1111 = 0xF
- 16 = 1 0000 = 0x10
- 255 = 1111 1111 = 0xFF
- 256 = 1 0000 0000 = 0x100
- 1024 = 100 0000 0000 = 0x400
How to convert by hand
- Binary → decimal: add the powers of 2 of each 1 bit (1011 = 8 + 2 + 1 = 11)
- Decimal → binary: divide by 2 repeatedly and read the remainders bottom-up
- Hex ↔ binary: each hex digit is exactly 4 bits (F = 1111)
- Octal ↔ binary: each octal digit is exactly 3 bits (7 = 111)
- Letters A–Z stand for digit values 10–35 in bases above 10
Frequently Asked Questions
How do I convert binary to decimal?
Multiply each bit by its power of two and add them up: 1101₂ = 1×8 + 1×4 + 0×2 + 1×1 = 13. Or just type the binary number into the Binary field.
How do I convert decimal to hexadecimal?
Divide the number by 16 repeatedly and write the remainders (10–15 as A–F) in reverse order: 255 = FF, 4096 = 1000. The converter does it instantly.
Is there a size limit?
No practical limit: the tool uses BigInt arithmetic, so even numbers with hundreds of digits are converted exactly.
How are negative numbers handled?
The sign is kept separately (−1010₂ = −10). Two’s complement depends on the bit width, so it is not applied automatically.
How does text to binary work?
Each character is encoded as UTF-8 bytes and every byte is written as 8 binary digits. “A” is 01000001; Turkish letters and emoji take two to four bytes.
Can I decode binary without spaces?
Yes. A continuous binary string whose length is a multiple of 8 is split into bytes automatically; for hex, pairs of digits are used.