Number Base Converter
Enter a number in any base to see it converted to binary, octal, decimal, and hexadecimal - or choose a bitwise operation to combine it with a second value.
Last updated: September 22, 2026
Frequently asked questions
What's the difference between this and the Binary to Text Converter?
This tool converts a number between numeric bases (binary/octal/decimal/hex) and does bitwise math (AND/OR/XOR/shifts) - it's for working with the number itself. The Binary to Text Converter instead converts between plain text and its 8-bit ASCII binary representation (like converting the word "Hi" to 01001000 01101001) - it's for encoding/decoding text, not numeric base math. Use this tool for numbers, that one for text.
How do I convert a hex value to binary?
Set "Number's base" to Hexadecimal, enter your value (e.g., FF), leave the bitwise operation as "None," and the binary, octal, and decimal equivalents all show at once (FF = 11111111 in binary, 377 in octal, 255 in decimal).
What does AND, OR, and XOR actually do to the bits?
AND returns 1 in each bit position only where both numbers have a 1 (useful for masking specific bits). OR returns 1 where either number has a 1. XOR returns 1 where exactly one of the two numbers has a 1 (0 where they match) - commonly used for toggling bits or simple checksums.
Why do negative results look like a long string of 1s in binary?
This uses 32-bit two's-complement representation, the standard way computers represent negative integers - a negative number's binary form has its leading bits set to 1. For example, -1 in 32-bit binary is 32 ones (11111111111111111111111111111111).
What's a practical use for the shift operations?
A left shift by N is equivalent to multiplying by 2^N, and a right shift by N is equivalent to dividing by 2^N (rounding toward negative infinity) - these come up often in programming for fast power-of-2 math, packing multiple values into one integer, or working with flags and bitmasks.
Can I enter a value with a 0x or 0b prefix, like 0xFF?
Yes - a leading 0x, 0b, or 0o prefix is stripped automatically before parsing, so you can paste values directly from code without editing them first, as long as you've also selected the matching base in the dropdown.