Number Base Converter
Convert between binary, octal, decimal, hexadecimal and any base up to 36, with big numbers.
How it works
Type a number in any base from 2 to 36 and see it in binary, octal, decimal, hexadecimal and base 36. Numbers can be as big as you like because the tool uses exact big-integer arithmetic. Choose a bit width to see the two's complement form that computers use for negative numbers.
Worked example
255 in decimal is 11111111 in binary, 377 in octal and FF in hex. -5 in 8-bit two's complement is 11111011 (hex FB).
Good to know
- Hex is a short way to write binary: each hex digit is exactly 4 bits.
- To get two's complement by hand: write the positive number in binary, flip all bits, add 1.
- Prefixes 0x, 0b and 0o are accepted for hex, binary and octal. Underscores and spaces are ignored.
- Digits above 9 are the letters a to z, so base 36 uses 0-9 and a-z.
Common questions
- How do I convert decimal to binary by hand?
- Divide by 2 repeatedly and read the remainders from bottom to top.
- What is two's complement?
- The usual way to store negative integers in n bits. The top bit is the sign.
- Can I convert fractions?
- No, only whole numbers.
More in Utilities.
Find the date that is some days, weeks, months, years or working days from a date, and see the weekday and week number.
OPEN →Age CalculatorYour exact age in years, months and days, the day you were born, your next birthday, and the age gap with another person.
OPEN →Area ConverterConvert square metres, square feet, acres, hectares and more.
OPEN →