← All Tools
Base Converter🔒 100% local
Convert numbers between any bases (2-36). Supports binary, octal, decimal, hexadecimal, and custom bases.
Converts a whole number from one base to another, with the two bases picked from dropdowns that cover 2 to 20 and then 36. Digits are read as 0-9 and A-Z, converted to a decimal value in the page and written back out in the target base, all inside the tab you are typing in.
How to use it
- Pick the base you are converting from and the base you are converting to.
- Type the number. Letters are upper-cased for you as you type.
- Press Convert, or use Swap first to put the two bases the other way round.
Worked example
255 (base 10 to base 16)becomesFFHex output uses upper-case letters.
1010 (base 2 to base 10)becomes10777 (base 8 to base 16)becomes1FFOctal 777 is 511 in decimal, which is 1FF in hex.
9 (base 8 to base 10)becomesInvalid character '9' for base 8A digit that does not exist in the source base is refused, and the message names the character and the base.
When to use it
- Reading a bitmask or a device register written in binary and wanting it in hex.
- Checking an octal file mode from a listing against the decimal value in a config file.
- Working through a base-N exercise where the intermediate decimal value has to be shown.
What it does not do
- Integers only. A decimal point, a minus sign, a leading 0x or an internal space is an invalid character, so 0x10 in base 16 fails on the X and 1 0 in base 2 fails on the space. Whitespace around the number is trimmed.
- The dropdowns skip bases. They run 2 to 20 and then jump straight to 36, so a base such as 24 cannot be selected even though the conversion routine would cope with it.
- Output is a bare number with no prefix or grouping: converting to hex gives FF, not 0xFF.
- Bits are not shown. There is no binary view of the result, no fixed-width or padded form, and nothing larger than the text box can hold is handled.