🔢 Number Base Converter

Convert between binary, octal, decimal, hexadecimal — or any base from 2 to 36 — with big-integer support and batch mode.

Digits 0-9 and letters a-z represent values 10-35 (upper or lower case both work).

📦 Batch conversion

📖 Quick reference: 0-15 in four bases

DecimalBinaryOctalHexBase 36

Handy shortcut: group binary digits in fours from the right and each group maps straight to one hex digit (1010 = A). Group in threes for octal. That is why hex and binary conversions never need rounding.

How to use the Number Base Converter

Convert between any base from 2 to 36, handling binary, octal, decimal and hexadecimal as well as custom bases.

How it works

Base conversion works by repeated division for integer-to-base conversion and by positional expansion in reverse: value = Σ digit × baseposition. Digits above 9 use letters, so A is 10, F is 15 and Z is 35. The conversion is exact in principle, but browsers represent numbers as double-precision floats, which is why extremely long values can lose accuracy.

When to use it

Use it for bitwise work, decoding encoded data by hand, reading hexadecimal offsets in documentation, and learning positional number systems.

Worked example

The same value in several bases:

DecimalBinaryOctalHex
0000
42101010522A
25511111111377FF
1024100000000002000400
655351111111111111111177777FFFF

Assumptions and limitations

Very large integers beyond roughly 100 digits may show wrong results because of float precision limits. IPv6 addresses are written in a similar format but are not a plain base conversion. Different programming languages handle overflow differently, so a value beyond 32 or 64 bits may wrap or lose precision. Negative numbers and fractions are not handled by this tool.

Frequently Asked Questions

How do I convert decimal to binary?

Repeatedly divide by 2 and record the remainders, then read them in reverse. For example, 13 ÷ 2 = 6 remainder 1, 6 ÷ 2 = 3 remainder 0, 3 ÷ 2 = 1 remainder 1, 1 ÷ 2 = 0 remainder 1 — reading the remainders bottom-up gives 1101. This tool does the same thing instantly for any base from 2 to 36.

Why are hexadecimal and binary so easy to convert?

Because 16 is a power of 2: each hex digit maps to exactly four binary bits. So 0xA3F becomes 1010 0011 1111 — just expand each hex digit to 4 bits and concatenate. Octal works the same way with 3 bits per digit, which is why the grouping is always exact with no rounding.

How large a number can this converter handle?

There is no practical limit. The conversion uses JavaScript BigInt rather than floating-point numbers, so it stays exact for numbers far beyond 2^53 — the point where ordinary JavaScript arithmetic starts losing precision. Any length of digit string is fine.

What is base 36 used for?

Base 36 (digits 0-9 plus a-z) is the densest base that stays readable with plain alphanumeric characters. It shows up in short URLs, shortened IDs, licence-plate style codes and JavaScript's own Number.prototype.toString(36). Base 32, 60 and 64 are common in encoding work, and base 2, 8, 10 and 16 dominate computer science.

🛒 Recommended for You

As an Amazon Associate, Benditools earns from qualifying purchases.