Updated · Built and checked by the PlinzoTools team, formulas tested against published sources
Convert an integer between any two number bases from 2 to 36.
ff
This tool converts an integer between any two number bases from 2 to 36 -- binary, octal, decimal, and hex are just the 4 most common special cases. Base 36 uses digits 0-9 followed by letters a-z, the maximum base representable with the standard alphanumeric character set.
Enter a value and its source base, then choose a target base. The converted value appears instantly.
The source value is parsed as an integer in the source base, then re-expressed in the target base -- each "digit" in a base above 10 uses a letter (a=10, b=11, ... z=35). The tool validates that every character in your input is actually a legal digit in the chosen source base.
255 in base 10 converts to ff in base 16. Separately, 1010 in base 2 converts to a in base 36.
For the specific binary/octal/decimal/hex conversions with dedicated tools, see the existing Decimal ↔ Binary converter pair. For two's complement binary representation of negative numbers, see the existing Two's Complement Calculator.
Type the value, set the From Base (2 to 36) and the To Base (2 to 36). The result appears in lowercase in the Base N result box. The default input is 255 from base 10 to base 16, giving ff. To reverse a conversion, swap the two base numbers and paste the answer back in as the value. Upper or lower case input is accepted, since letters are lowercased before parsing, and leading zeros are ignored.
The tool refuses input that contains a character not valid in the source base. For instance 128 as base 8 is rejected since 8 is not an octal digit, and 12 as base 2 is rejected because 2 is not a binary digit. A decimal point also causes an error (1.5 is rejected), since the tool handles whole numbers only, as does a leading plus sign. If both bases are outside 2 to 36, an error asks you to stay within that range.
The conversion uses ordinary JavaScript numbers, which are exact only up to 9,007,199,254,740,991 (about 9 quadrillion). Very long inputs beyond that lose precision, and the tool may report them as invalid even when they are correct, for example a 20-digit decimal value. For big numbers, such as 64-bit identifiers, use a converter based on arbitrary-precision integers, or check the result by converting back to the original base and comparing.
The tool is designed for non-negative integers. In practice a leading minus sign is passed through, so -ff in base 16 gives -11111111 style output with a sign, but this is simple sign-magnitude notation, not two's complement. If you need the bit pattern that a computer uses for negative values, use a two's complement calculator instead.
Base 36, since it uses the full set of digits (0-9) plus every letter of the alphabet (a-z) as additional digit symbols -- there's no standard symbol set for bases higher than 36.
Only in a simple way -- a leading minus sign passes through, so the tool converts the magnitude and keeps the sign (for example -ff in base 16 becomes -11111111 in base 2). It does not produce two's complement; for negative number representation in binary, see the existing Two's Complement Calculator.
Different contexts favor different bases -- binary for low-level bit operations, hex for compact byte/color representation, and higher bases (like 36 or 62) for compact unique identifiers in URLs.
At least one character is not a legal digit in your chosen From Base. In base 8, the digits 8 and 9 are illegal, and in base 2 only 0 and 1 are allowed.
Lower case. For example 255 in base 16 shows ff, not FF.
No. Only whole numbers are supported, and a fractional input is reported as invalid.
Precision is lost with standard JavaScript numbers, so such values may be flagged as invalid or converted inexactly. Use a big-integer tool for those.
Reference: MDN Web Docs