Number Base Converter
Convert numbers between binary, octal, decimal, hexadecimal, and any base 2-36. Live two-way: edit any field, the others update. Useful for low-level work, IP math, bit manipulation, or sanity-checking that 0xFF really is 255.
Bit view
How to use the Number Base Converter
Type a number in any field. The other bases update live. Hex accepts 0x prefix or bare; binary accepts 0b prefix or bare. Negative numbers work for decimal, displayed as two's complement for hex/binary up to 64-bit precision.
How positional bases relate
Every whole number can be written in any base: base 10 groups by powers of ten, base 2 by powers of two, base 16 by powers of sixteen. The value is the same; only the notation changes. Hexadecimal is popular in programming because each hex digit maps to exactly four binary bits, so 0xFF is plainly 1111 1111, or 255. Octal groups bits in threes, a hangover from older hardware and still seen in Unix file permissions.
This converter shows binary, octal, decimal, and hex side by side, plus any base from 2 to 36, and updates every field as you type in one. Negative numbers display in two's complement for the binary and hex views, the representation actual hardware uses, up to 64-bit precision — handy for bit manipulation, IP math, or simply confirming a hex literal is the value you think it is.
Common use cases
- Bit manipulation — see a value's binary form while working with masks and flags.
- Reading hex literals — confirm that a constant like
0xFFis the decimal value you expect. - File permissions — translate between octal Unix modes and their binary meaning.
- Networking math — convert between decimal and hex when working with addresses or masks.
- Learning number systems — watch how the same number looks across bases as you type.
Frequently asked questions
What bases does it support?
How are negative numbers shown in binary and hex?
Why does each hex digit equal four binary bits?
Can I paste values with 0x or 0b prefixes?
0x prefix or a bare value, and the binary field accepts 0b or bare digits, so you can paste literals straight from source code.