A number base converter rewrites an integer. This number base converter accepts bases 2 through 36. Digits are 0–9 then a–z. Case does not matter. An optional leading minus is a sign, not two’s complement. Optional prefixes 0b, 0o, and 0x are accepted only when the from-base is 2, 8, or 16. A digit that does not exist in the from-base is an error. The page will not wrap 8 in binary into a 0.
Work uses integer arithmetic, not JavaScript Number, so values longer than 15 decimal digits are not silently rounded. Input is capped at 64 digits so a tab does not freeze. Fractions are not supported. 10.5 in base 10 is rejected.
This is not a JSON tool. It will not parse objects or escape strings. The Roman Numeral Converter is the other number-representation page in this group; it is not a base, and this page will not emit XIV.
Empty input is an error. Markup is not digits. Enter converts. Output is lowercase for a–z.
255 in base 10 is ff in base 16 and 11111111 in base 2. 0xff with from-base 16 is the same 255. “0xff” with from-base 10 is invalid. “G” is valid only in bases 17–36.
255 (10) = ff (16)
255 (10) = 11111111 (2)
0xff (16) = 255 (10)
If you needed a Roman numeral, use that converter. If you needed JSON hex escapes, use JSON Escape. This page only changes base.
Color codes and memory addresses are often hex. 255 decimal is ff, which is why “full” in an eight-bit channel is written that way. Binary is for bit masks; keep the from-base on 2 when the source used 1s and 0s only. Octal still appears in Unix file modes; 755 decimal is a different integer than 755 octal. Choose the from-base that matches the source, not the one you wish they had used.
Spaces inside a number are stripped. A thousands separator that is not a comma may survive and then fail the digit check. That is intentional. The page will not guess a locale. Leading plus is ignored. Two minuses are invalid. HTML and script-looking strings fail as soon as a character is not a digit for that base. Swap bases after a convert if you want to read the same integer the other way without retyping. Zero is a valid integer in every base and prints as 0. A blank field is not zero. Fractions with a point are rejected even in decimal. The result is written as text, so a hex string cannot become a page element. Keyboard users can press Enter from the field or either list.
Whole numbers only, bases 2–36. Optional 0b, 0o, or 0x prefixes when they match the from-base. Digits use 0–9 then a–z. At most 64 digits.
2 through 36. Binary, octal, decimal, and hex are listed first.
8 is not a binary digit. The page reports the invalid digit instead of wrapping it.
No. 0x is accepted only when the from-base is 16.
No. A leading minus is a sign. There is no fixed bit width.