Number Base Converter (Base 2 to 36)
Convert numbers between any bases from 2 to 36 with arbitrary precision: binary, octal, decimal, hex, negatives and fractions. Free and runs in your browser.
Any size (arbitrary precision). Use a leading - for negatives and a . for fractions; spaces, _ and the prefixes 0x / 0o / 0b are ignored.
11111111377255FF73What is Number Base Converter?
This converter rewrites a number from any base between 2 and 36 into binary, octal, decimal, hexadecimal and one extra base of your choice. It uses arbitrary-precision integers, so 64-bit and larger values convert exactly, and it handles negative numbers and fractional parts.
How to use Number Base Converter
- Enter the value in Number, for example
255,-10,ff.8or0b1010. - Choose the Input base the number is written in (2 to 36).
- Pick an Extra target base if you need something other than 2, 8, 10 or 16.
- Toggle Uppercase letters or Group digits for readability and copy any result row.
Example
255 (base 10)
Binary 11111111 · Octal 377 · Hexadecimal FF · Base 36: 73
When to use Number Base Converter
Use it for programming tasks such as reading bit masks, memory addresses, color channels or base-36 IDs. It is not a two's-complement calculator: negative numbers are written with a minus sign, not as fixed-width bit patterns.
How Number Base Converter works
The integer part is read digit by digit into a JavaScript BigInt (value = value × base + digit), so there is no 2^53 precision limit. The fractional part is kept as an exact fraction numerator / base^k. Output integers use BigInt.toString(base); fractions are produced by repeatedly multiplying by the target base and taking the integer part, up to 32 digits. If the fraction does not terminate (for example 0.1 decimal in binary) the result is cut after 32 digits and a notice is shown. Digits above 9 use the letters a–z.
Common Use Cases
- Convert a hex memory address to decimal
- Write a permission or flag value in binary to see which bits are set
- Decode a base-36 short ID into its decimal value
- Check how 0.1 is represented in binary and why it is not exact
- Convert a 128-bit hexadecimal number to decimal without losing digits
FAQs
How large can the number be?
There is no fixed limit: BigInt arithmetic handles hundreds of digits, so values like 2^128 convert exactly.
Can I use prefixes such as 0x or 0b?
Yes. The prefix matching the selected input base (0x for 16, 0o for 8, 0b for 2) is ignored, as are spaces and underscores used as digit separators.
Why is my fraction cut off?
Many fractions repeat forever in another base (0.1 decimal is 0.000110011… in binary). The converter stops after 32 fractional digits and tells you the result is truncated.
Are negative numbers shown in two's complement?
No. They keep a leading minus sign (−10 → −1010). Two's complement depends on a fixed bit width, which this general-purpose tool does not assume.