Number Base Converter

Convert a whole number between binary, octal, decimal and hexadecimal, plus any other base from 2 to 36. Numbers of any length are handled exactly with BigInt arithmetic, so a 128-bit hash or a huge factorial converts without losing digits, and negative numbers keep their sign.

Number Converters Runs in your browser

Convert a Number Between Bases

Prefixes 0b, 0o and 0x are recognised; spaces and underscores are ignored.

How to Use the Number Base

  1. Type or paste the number. A prefix such as 0x or 0b sets the base automatically.
  2. Otherwise choose the Input base (or Other base and its value).
  3. Read the number in binary, octal, decimal, hexadecimal, base 36 and your extra output base.
  4. Toggle digit grouping or upper-case letters to suit the format you need.

About This Tool

Programmers reading memory addresses, colour codes and bit masks, computer science students, electronics hobbyists and puzzle solvers.

Input: A whole number in base 2–36  ·  Output: The number in other bases.

Features and Limitations

Features

  • Arbitrary size: no rounding, thanks to BigInt.
  • Any base from 2 to 36 in and out.
  • Recognises 0b, 0o and 0x prefixes and ignores spaces and underscores used as separators.
  • Shows bit length and digit count, with optional grouping into nibbles or bytes.

Limitations

  • Whole numbers only; fractional parts such as 0.1 (binary 0.000110011…) are not converted.
  • Negative numbers are shown with a minus sign, not as two's complement.
  • Results are computed in your browser; nothing you enter is sent to a server.

Example

255 = 0b1111 1111 = 0o377 = 0xFF = 73 in base 36. 0xDEADBEEF = 3735928559.

Frequently Asked Questions

How do I convert binary to decimal?

Multiply each digit by its power of two and add them: 1011 = 1×8 + 0×4 + 1×2 + 1×1 = 11. The converter does this for numbers of any length.

Why do hexadecimal digits include letters?

Base 16 needs sixteen symbols, so after 0–9 it uses A–F for 10–15. Base 36 uses all letters A–Z, which is why it is the highest base offered.

Does it handle very large numbers?

Yes. BigInt arithmetic has no fixed size, so 64-bit, 128-bit and larger values convert exactly.

How are negative numbers shown?

With a minus sign, for example −0xFF. Computers often store negatives as two's complement, which depends on the bit width; that representation is not produced here.

Related Tools

More like this: all Number Converters tools, all Converters tools or the TinySandy home page.