Base Converter

Convert any base 2–36 to any other base instantly — binary, octal, decimal, hexadecimal and beyond. Free, fast, no sign-up.

Last updated: October 2026

Result —

How to convert between number bases

  1. Write down the number and number each digit's position from right to left, starting at 0.
  2. Convert each digit to its value (0–9 stay 0–9; A–Z mean 10–35) and multiply by the base raised to its position.
  3. Add all the results — that's the decimal value. To reach another base, repeatedly divide by the target base and read the remainders from bottom to top.

Example: FF₁₆ = (15 × 16¹) + (15 × 16⁰) = 240 + 15 = 255₁₀.

Background reading: radix and positional notation on Wikipedia.

Digit values (bases up to 36)

DigitValueDigitValueDigitValue
001122
334455
667788
99A10B11
C12D13E14
F15G16H17
I18J19K20
L21M22N23
O24P25Q26
R27S28T29
U30V31W32
X33Y34Z35

Base conversion in code

Python

int("ff", 16)          # → 255  (any base 2–36)

def to_base(n, b):
    digits = "0123456789abcdefghijklmnopqrstuvwxyz"
    if n == 0:
        return "0"
    out = ""
    while n > 0:
        out = digits[n % b] + out
        n //= b
    return out

to_base(255, 16)       # → 'ff'

JavaScript

parseInt("ff", 16);   // → 255  (any base 2–36)
(255).toString(16);   // → "ff" (any base 2–36)

C

#include <stdio.h>
#include <stdlib.h>

int main(void) {
    printf("%ld\n", strtol("ff", NULL, 16));  /* → 255 */
    return 0;
}

Real-world applications

Common mistakes

Common values

  • FF₁₆ = 255₁₀
  • 1010₂ = 10₁₀
  • 777₈ = 511₁₀
  • 100₃₆ = 1296₁₀
  • ZZ₃₆ = 1295₁₀ (largest 2-digit base-36 value)
  • 0 = 0 in every base

Key takeaways

  • Every base works the same way: digit × baseposition, summed.
  • Digits run 0–9 then A–Z for values 10–35; base 36 is the largest supported.
  • Convert via decimal as the middle step, or let the tool do it directly.
  • 0x, 0b and 0o prefixes plus spaces, commas and underscores are accepted.
  • Big bases like 36 keep numbers short — handy for compact IDs.

Frequently asked questions

How do I convert between any two number bases?

Convert to decimal first: multiply each digit by the base raised to its position power and sum the results. Then convert the decimal value to the target base by repeated division, reading the remainders bottom-up. The converter above does both steps instantly.

What number bases does this converter support?

Any base from 2 (binary) to 36, using digits 0–9 and letters A–Z for values 10–35.

How do I convert FF from hexadecimal to decimal?

FF in hex = 15 × 16 + 15 = 255 in decimal.

What is 100 in base 36?

100 in decimal = 2S in base 36 (2 × 36 + 28 = 100, and 28 is written S).

Can I use prefixes like 0x or 0b?

Yes — 0x, 0b and 0o prefixes are recognized for hex, binary and octal inputs, and spaces, commas, underscores and dashes are ignored.

Why does base 36 use letters?

Beyond digit 9, bases use letters A–Z for values 10–35. Base 36 uses all of them, which makes numbers short — handy for compact IDs and URL shorteners.

Can this converter handle very large numbers?

Yes — it uses arbitrary-precision arithmetic, so inputs hundreds of digits long convert with no overflow or rounding.

What is the largest digit in base 16?

F, worth 15. In any base, the largest digit is always one less than the base.

Need a specific pair? Try our hex to decimal or binary to decimal converters.

More converters

From the blog

Add this converter to your website

Embed our free base converter on your own site with one line of code:

<script src="https://binary-to-decimal-28z.pages.dev/embed.js"></script>

For developers

Converting bases in your own app? Use our free BinDec JavaScript API — one function call, any base 2–36, arbitrary precision.