Skip to content

Base Converter (Base 2 to 36)

Type a number, pick its base and the base you want, and get an exact result with a quick view in binary, octal, decimal, hexadecimal and base 36.

Processed locally in your browser

Options

Fractions are rounded to this many digits (0–20).

One number per line. Spaces and underscores inside a number are ignored.0 chars · 0 lines
The result will appear here.

What is Base Converter (Base 2 to 36)?

A positional numeral system writes a number as digits multiplied by powers of a base. Computers favour base 2 and 16, people use base 10, and base 36 (digits 0-9 and letters a-z) is common for short IDs. This converter supports every base from 2 to 36.

It works with arbitrary-precision integers, so a value like 2^200 converts without rounding. It understands 0x, 0b and 0o prefixes, ignores spaces and underscores, keeps the minus sign and can convert fractions such as 12.375 up to 20 digits, telling you when a fraction had to be rounded.

How does it work?

  1. Enter one number per line. Choose the source base, or “Auto” to let a 0x, 0b or 0o prefix decide.
  2. Choose the target base, the maximum number of fraction digits, grouping, prefix and letter case.
  3. Read the result on the left; for a single number the rows show the same value in bases 2, 8, 10, 16 and 36.
  4. Copy the output or download it as a text file.

Common use cases

  • Checking a hexadecimal constant against its decimal and binary value while reading code.
  • Converting large IDs or hashes written in base 36 or base 62-like alphabets to decimal.
  • Working out the base-2 expansion of a fraction such as 0.1 to see why floats are inexact.
  • Homework and exam practice on number systems with exact answers.

Examples

Try this input in the tool above:

Input
255
-12.375
123456789012345678901234567890
Output
ff
-c.6
18ee90ff6c373e0ee4e3f0ad2

Privacy

Base Converter (Base 2 to 36) runs entirely in your browser. The text or files you provide are processed on your device and are not uploaded, logged or stored on our servers.

Limitations

Fractions that do not terminate in the target base are rounded to the chosen number of digits (at most 20). Digits above 9 are the letters a-z, so bases above 36 are not supported.

Frequently asked questions

Can it convert very large numbers exactly?

Yes. Integers use arbitrary-precision arithmetic, so 2^200 or a 60-digit decimal converts exactly instead of losing precision like a JavaScript Number would.

Why does 0.1 not end in binary?

0.1 in decimal is a repeating fraction in base 2 (0.000110011…). The tool rounds it to your chosen digit limit and shows a note when that happens.

How are prefixes handled?

A prefix is only stripped when it matches the source base, so 0xFF is read as hexadecimal in base 16 or Auto, while “0b1” in base 16 is simply the digits 0, b, 1.

More tools in Developer Tools →