Numeral Base Converter

Convert integers between Decimal, Hexadecimal, Binary, Octal, and custom bases with arbitrary-precision math. 100% local calculation.

Invalid Decimal digit (use 0-9)
Invalid Hexadecimal digit (use 0-9, A-F)
Invalid Binary digit (use 0, 1)
Invalid Octal digit (use 0-7)
Custom Base:
Invalid digits for the selected custom base
Comprehensive Developer Guide Binary Arithmetic & Bitwise Computation Guide

Explore the underlying mathematics, RFC specifications, and production best practices in our deep-dive tutorial.

Read Guide →

Positional Numeral Systems & Radix Arithmetic Mathematics

A positional numeral system is a system for representing numbers in which the value of each digit depends on its position relative to the base (radix). In computer science and digital electronics, four foundational bases govern hardware architecture and low-level programming:

Our Numeral Base Converter performs arbitrary-precision conversions between bases 2 through 36 and supports fractional floating-point numbers with exact step-by-step arithmetic explanations.

Programmatic Radix Conversion in JavaScript & Python

// JavaScript native base conversion
const decimalNumber = 255;

console.log("Binary (Base 2):", decimalNumber.toString(2));       // "11111111"
console.log("Octal (Base 8):", decimalNumber.toString(8));         // "377"
console.log("Hex (Base 16):", decimalNumber.toString(16).toUpperCase()); // "FF"

// Parsing from another base back to decimal
console.log("Parsed Hex:", parseInt("FF", 16)); // 255
# Python 3
num = 255
print(bin(num)) # '0b11111111'
print(oct(num)) # '0o377'
print(hex(num)) # '0xff'

# Convert from binary string back to integer
print(int("11111111", 2)) # 255

BigInt Precision vs 64-Bit Float Limitations

Standard double-precision floats lose mathematical accuracy when converting integers larger than 53 bits (9,007,199,254,740,991). Our converter utilizes the ECMAScript BigInt API to process arbitrarily large integers (hundreds of digits) without precision loss or scientific notation rounding errors.

Custom Bases up to Radix 36

Bases up to 36 utilize the 10 standard digits (0–9) followed by all 26 letters of the English alphabet (A–Z). Base 36 is widely used in short URL generators (URL shorteners) and compact alphanumeric database primary keys.

Positional Number Systems, Arbitrary-Precision Radix & BigInt Math

Positional numeral systems represent real numbers through polynomials of a base radix b, where the value of digit d_n at position n equals d_n * b^n. The most ubiquitous computing radices are Base 2 (Binary), Base 8 (Octal file permissions), Base 10 (Decimal), and Base 16 (Hexadecimal byte notation).

In standard floating-point arithmetic (IEEE 754), integers exceeding 53 bits (9,007,199,254,740,991) suffer irreversible round-off errors and precision clipping. Our client-side converter bypasses JavaScript's floating-point limitations by executing all radix conversions using native BigInt primitives, enabling exact mathematical translations of 128-bit, 256-bit, and arbitrary-length cryptographic keys without numerical truncation.

Algorithm for Arbitrary Radix Conversion

To convert from source radix A to target radix B, the string is first evaluated into an integer value by Horner's polynomial accumulator method. Next, repeated division by radix B extracts remainder digits in reverse order until the quotient reaches zero, guaranteeing mathematically flawless conversions across bases 2 through 36.

Frequently Asked Questions

Binary strings are excessively long and difficult for humans to read. Because 16 is 2^4, every 4 binary bits condense cleanly into a single hex character, making 0xFF much easier to read than 11111111.

Each digit in chmod 755 corresponds to a 3-bit binary mask representing Read (4 / 100), Write (2 / 010), and Execute (1 / 001). Thus 7 = 4+2+1 (rwx).

Yes. Signed negative integers and two's complement representations are fully supported.

Because we use native BigInt arithmetic, you can convert numbers with hundreds of digits without overflow errors.

Yes. 100% of mathematical calculations run in your browser using client-side JavaScript.