Maths / Number bases
Number Base Converter (Base 2 to 36)
Convert numbers between any bases from 2 to 36, including negative numbers, fractions, and integers of any length, with repeating digits marked.
Number Base Converter (Base 2 to 36): The whole part is converted with exact big-integer arithmetic, so numbers with hundreds of digits stay exact. The fraction is converted as an exact ratio: digits that repeat forever are shown in parentheses, such as 0.0(0011) for decimal 0.1 in binary, and other long fractions are cut at 32 digits. 300 random conversions were checked against Python's exact arithmetic. Runs 100% locally in your browser with zero server file uploads.
- Category
- Developer tools
- Runs
- In your browser
- Cost
- Free · no sign-up
- Availability
- Ready to use
Runs entirely in your browser
| Binary | 1111 1111.1 | |
|---|---|---|
| Octal | 377.4 | |
| Decimal | 255.5 | |
| Hexadecimal | ff.8 | |
| Base 36 | 73.i | |
| Base 3 | 100 110.(1) |
Digits in parentheses repeat forever: 0.1 in decimal is 0.0(0011) in binary, which is why 0.1 cannot be stored exactly in a binary floating-point number.
Common bases in computing
Binary shows bits directly; octal is used for Unix file permissions, such as 755; hexadecimal writes a byte as two digits, as in colours and memory addresses; base 36 makes short IDs and URLs from large numbers, since it uses every digit and letter.
For single conversions, see binary to decimal and decimal to hex; for Roman numerals, the Roman numeral converter.
Converting by hand
To convert a whole number to another base, divide by the base repeatedly and read the remainders from last to first; for a fraction, multiply by the base repeatedly and read the whole parts from first to last. To convert back, multiply each digit by the base raised to its position and add them up.
How to use it
- Type a number, using a–z for digit values 10 to 35.
- Choose the base it is written in.
- Read it in binary, octal, decimal, hexadecimal, base 36, and one more base of your choice.
Privacy & limitations
Everything is worked out in your browser.
Related tools
Frequently asked questions
How do digits above 9 work?
Letters continue the digits: a is 10, b is 11, up to z for 35, so base 16 uses 0–9 and a–f and base 36 uses every digit and letter.
Why does 0.1 become a repeating binary fraction?
A fraction ends in a base only if its denominator's prime factors divide the base. 1/10 needs a factor of 5, which 2 lacks, so in binary it repeats, which is why 0.1 + 0.2 is not exactly 0.3 in most programming languages.
How are negative numbers written?
With a minus sign, as in mathematics. Computers store them in two's complement, which depends on the number of bits; use the binary result and invert it for a fixed width.
Free tool · runs in your browser · no account required