Number Base Converter: Binary, Octal, Decimal, Hex and Any Base from 2 to 36
Type a whole number in any base and see it in binary, octal, decimal, hexadecimal and a base of your choice (2 to 36) at once. Very large numbers stay exact, and the place-value and division-remainder steps show exactly how each conversion works.
- PriceFree, no login or sign-up needed
- Your dataCalculated in your browser; nothing is saved
- Works onPhone, tablet or computer, any modern browser
- Made byDr. Muhammad Aammar Tufail, Codanics
- Published24 November 2026
- Last updated24 November 2026
📚 How to cite this tool
This tool is free. If it helped your thesis, paper, report or assignment, please cite it. It keeps the tools free and helps other students find them.
Tufail, M. A. (2026). Number base converter [Online tool]. Codanics. Retrieved 24 November 2026, from https://codanics.com/tools/number-base-converter/
In-text citation: (Tufail, 2026) · Narrative: Tufail (2026)
The access date is today’s date, filled in automatically. Author: Muhammad Aammar Tufail. Published 24 November 2026.
How to use the number base converter
- Type a whole number, for example
2026,FFor101101. Prefixes like 0x and 0b, spaces and a minus sign are fine. - Choose the base the number is written in: binary, octal, decimal, hexadecimal or any other base from 2 to 36.
- Read the answer in all main bases at once, plus the extra base you set.
- Choose which division steps to show, follow the working, and press Copy result.
What is a number base?
A number base (or radix) is how many different digits a counting system uses: base 10 uses 0–9, base 2 (binary) uses 0 and 1, and base 16 (hexadecimal) uses 0–9 and A–F. Each place is worth the base times the place to its right. In decimal, 2026 means 2×1000 + 0×100 + 2×10 + 6×1.
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 7 | 111 | 7 | 7 |
| 10 | 1010 | 12 | A |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
| 255 | 11111111 | 377 | FF |
| 2026 | 11111101010 | 3752 | 7EA |
How to convert any base to decimal
Multiply each digit by the base raised to its position (counting from 0 on the right), then add.
How to convert decimal to binary (division-remainder method)
Divide by the new base again and again, writing down each remainder, until the quotient is 0. The remainders read from bottom to top are the answer. For 45 in binary:
The same method works for any base: divide by 8 for octal or by 16 for hex, and write remainders 10–15 as A–F.
Shortcuts and common mistakes
- Binary to hex: group the bits in fours from the right and pad the left with zeros. 0111 1110 1010 → 7 E A → 7EA.
- Binary to octal: group in threes. 11 111 101 010 → 3752.
- Reading remainders from top to bottom gives the digits backwards.
- A digit must be smaller than the base: “8” is not allowed in octal, and “2” is not allowed in binary.
- Very large numbers lose precision in normal JavaScript numbers above 2⁵³. This tool uses BigInt, so 2⁶⁴ − 1 stays exact.
Frequently asked questions
How do I convert decimal to binary?
Divide the number by 2 repeatedly and write down each remainder until you reach 0. Read the remainders from bottom to top. For example, 45 → 101101.
How do I convert binary to decimal?
Multiply each bit by 2 raised to its position, counting from 0 on the right, and add. For example, 101101 = 32 + 8 + 4 + 1 = 45.
What does hexadecimal mean?
Hexadecimal is base 16. It uses the digits 0–9 and the letters A–F for 10–15. One hex digit equals exactly 4 binary digits, which is why programmers use it for colours, memory addresses and bytes (FF = 255).
What is the largest base this converter supports?
Base 36, which uses all ten digits and all 26 letters. For example, ZZ in base 36 = 35 × 36 + 35 = 1295.
Can it convert very large numbers?
Yes. It uses exact whole-number arithmetic (BigInt), so numbers with hundreds of digits are converted without rounding. It works with whole numbers only, not fractions.
Does this converter save what I type?
No. Everything is converted in your browser and nothing is saved or uploaded. When you close the page, your numbers are gone.
Do I need to log in or create an account to use the number base converter?
No. There is no login, no sign-up and no email required. Open the page and start using it straight away, for free, on any device.
How do I cite this tool in my thesis or paper?
Use the citation box on this page. In APA 7th edition: Tufail, M. A. (2026). Number base converter [Online tool]. Codanics. Retrieved [date you used it], from https://codanics.com/tools/number-base-converter/. BibTeX, RIS (EndNote, Mendeley, Zotero), MLA, Harvard, Chicago and Vancouver formats are also available.
Free guides and courses from Codanics
More free tools
See all free Codanics tools → · Codanics on YouTube · WhatsApp channel