Convert whole numbers between binary, octal, decimal, hexadecimal, and any base from 2 to 36.
Calculations happen locally. We do not send your values to our server.
Example
Decimal 255 converts to FF in base 16, 11111111 in base 2, and 377 in base 8. Negative whole numbers are supported.
Calculation method
Each input digit is validated against its selected base, then accumulated using exact integer arithmetic. The resulting integer is repeatedly represented with digits 0–9 and letters A–Z in the output base.
Important notes
Input and output bases must differ and can range from 2 to 36. Enter at most 256 digits, without prefixes such as 0x, separators, decimal points, or fractional parts.
Identify the input base first
A digit string does not identify its own base: 10 means two in binary, ten in decimal and sixteen in hexadecimal. Select the base in which the original number was written before selecting the destination. Letters represent values 10 through 35, so F is valid in base 16 but not in base 10.
Verify a conversion with place values
Hexadecimal FF means 15 × 16 + 15 = 255. Binary 101010 means 1 × 32 + 0 × 16 + 1 × 8 + 0 × 4 + 1 × 2 + 0 = 42. Use the examples to check direction, then use Swap bases after a successful conversion to convert the result back. The numeric value should return even if leading zeros do not.
Distinguish signed integers from byte encodings
Negative numbers retain a minus sign; converting -42 to binary produces -101010. This is not a fixed-width two’s-complement representation. The converter does not infer byte width, endianness or a character encoding. Remove prefixes such as 0x and 0b, enter no more than 256 digits, and use a dot-free whole number. Exact integer arithmetic preserves values beyond ordinary floating-point precision.
Example · Calculation method
Example
Result
255₁₀ → 16
FF
FF₁₆ → 2
11111111
101010₂ → 10
42
377₈ → 10
255
Z₃₆ → 10
35
−42₁₀ → 2
−101010
Frequently asked questions
Which digits can I use in each base?
Base 2 uses 0–1, base 8 uses 0–7, base 10 uses 0–9, and base 16 adds A–F. Bases up to 36 can use letters through Z; letter case is ignored.
Does this preserve leading zeros?
No. Leading zeros do not change the integer value and are removed from the converted result. A negative zero is displayed as zero.
Are large integers converted exactly?
Yes. The converter uses exact integer arithmetic and accepts up to 256 input digits. It does not support decimal fractions or scientific notation.