Logo

MonoCalc

/

Base Number Converter

Converter

Signed Integer

Prefix (0b / 0o / 0x)

Group every

digits

Precision

Show Steps

About This Tool

Base Number Converter – Convert Between Any Numeral Systems

The Base Number Convertertranslates integers and fractional numbers between any two numeral systems from base 2 to base 36. Whether you need binary, octal, decimal, hexadecimal, or an arbitrary base like base 32 or base 36, this tool handles them all in one place — with optional two's complement signed-integer interpretation, digit grouping, standard prefixes, and a step-by-step division-remainder walkthrough.

What Is a Number Base?

A numeral base (also called a radix) defines how many unique digit symbols a number system uses. Base 10 (decimal) uses digits 0–9 and is the everyday standard. Base 2 (binary) uses only 0 and 1 and is the native language of every digital processor. Base 16 (hexadecimal) uses 0–9 plus A–F and is ubiquitous in color codes, memory addresses, and data encoding. Bases above 10 borrow letters from the alphabet: base 36 uses all of 0–9 and A–Z, giving 36 distinct symbols per digit position.

How the Conversion Works

Conversion happens in two stages. First, the tool parses every digit of the source number according to the From Base, assigning each character its positional value (digit × base^position), and sums them to obtain a decimal intermediate. Second, it applies thedivision-remainder algorithm: the decimal value is repeatedly divided by the target base and the remainders — read in reverse order — form the output. For fractional parts the tool uses repeated multiplication: multiply the fraction by the target base, record the integer portion, and repeat for the remaining fraction.

Enable Show Steps to see every division step laid out as a table so you can follow the working by hand.

Two's Complement Signed Integers

Modern processors store negative integers using two's complementencoding. In 8-bit two's complement, the value 0xFF (hex) equals -1 decimal because the leading bit signals a negative number. Enable Signed Integer mode and choose a bit width — 8, 16, 32, or 64 bits — to apply this interpretation. This is essential when working with processor registers, disassembled machine code, or network protocol fields.

Prefix Display and Digit Grouping

Standard programming languages use prefixes to make the base explicit: 0b for binary, 0o for octal, and 0x for hexadecimal. Enable Prefix (0b / 0o / 0x) to add these automatically to the output.

Long binary numbers are notoriously hard to read. The Group every N digits option inserts spaces at regular intervals from the right (for example, every 4 binary digits: 1111 0000 1010 0101), making patterns and nibble boundaries immediately visible.

Fractional Numbers and Precision

Enter a decimal point in the input to convert non-integer values. For example, 0.1 in decimal becomes 0.0001100110011... in binary — an infinitely repeating fraction — because most decimal fractions have no finite binary representation. The Precision setting controls how many digits appear after the point in the output (0–20 places).

Color Code Helper

When the input or output in base 16 is exactly six characters, the tool recognises it as an RGB color triplet and shows a color swatch. For example, entering FF6600 in hexadecimal displays an orange swatch alongside the value, making it easy to visually verify web colors.

Common Use Cases

  • Binary ↔ Decimal: understanding how computers store integer values, verifying bitfield calculations.
  • Hex ↔ Decimal: decoding memory addresses, CSS color codes, and network packet values.
  • Octal ↔ Binary: translating Unix file permission codes such as 755 into their binary bit patterns.
  • Arbitrary bases (2–36): working with Base32 data encoded URLs, Base36 short IDs, or ternary logic experiments.
  • Two's complement: interpreting raw register dumps or signed fields in binary protocols without manual arithmetic.

Accuracy and Limitations

Integer conversions are exact for values up to JavaScript's safe integer limit of 253 − 1 (9,007,199,254,740,991 in decimal). Larger integers may lose precision due to floating-point representation. For cryptographic-grade large integers, use a dedicated arbitrary precision library instead. Fractional conversions are inherently approximate for most base combinations; increase the Precision value to see more digits.

Frequently Asked Questions

Is the Base Number Converter free?

Yes, Base Number Converter is totally free :)

Can I use the Base Number Converter offline?

Yes, you can install the webapp as PWA.

Is it safe to use Base Number Converter?

Yes, any data related to Base Number Converter only stored in your browser (if storage required). You can simply clear browser cache to clear all the stored data. We do not store any data on server.

How does this Base Number Converter work?

Enter any number in your chosen source base (2–36), select the target base, and the tool instantly converts it. Internally it parses each digit according to the source base, computes the decimal value, then repeatedly divides by the target base to produce the output digits. You can optionally show step-by-step division-remainder working.

What bases are supported?

The converter supports any base from 2 (binary) to 36. Bases up to 10 use digits 0–9; bases 11–36 also use letters A–Z (case-insensitive). Common presets — binary (2), octal (8), decimal (10), and hexadecimal (16) — are available as quick-select buttons.

What is two's complement mode and when should I use it?

Two's complement is the standard way computers represent negative integers in binary. Enable Signed Integer mode and choose a bit width (8, 16, 32, or 64) to interpret the input as a signed number. For example, 0xFF in 8-bit two's complement equals -1 decimal. This mode is essential when working with processor registers, memory addresses, or low-level binary data.

Can I convert fractional (non-integer) numbers?

Yes. Enter a decimal point in the input (e.g., 10.1 in binary or A.8 in hex). The integer and fractional parts are converted independently, and you can control how many fractional digits appear in the output via the Precision setting (0–20 places).

What do the prefix display and digit grouping options do?

Prefix Display prepends standard notation to the result: 0b for binary, 0o for octal, and 0x for hexadecimal, making it clear which base the number belongs to. Digit Grouping inserts spaces every N digits from the right (e.g., every 4 bits in binary), improving readability for long numbers like memory addresses.

How accurate are the conversions?

Integer conversions are exact for all values within JavaScript's safe integer range (up to 2^53 − 1). Fractional conversions may have small rounding errors because most fractions cannot be represented exactly in a finite number of digits in every base — the same limitation applies in decimal. Increasing the Precision setting gives more digits at the cost of potential trailing rounding.