← All tools
// Number

Number Base Converter online

Convert between binary, hexadecimal, octal, decimal, and any base

Number Base Converter logo
by
CHUNKY
MUNSTER
// Bitwise Calculator (32-bit integers)

How to Use the Number Base Converter

  1. Pick the base of the number you're entering from the dropdown - Decimal (10), Binary (2), Octal (8), Hex (16), Base 32 or Base 36.
  2. Type or paste the number - only digits/letters valid for that base are accepted.
  3. All six bases recompute live as you type; click Copy on any panel to grab that representation.
  4. Invalid input for the chosen base shows an inline error rather than a silent zero.

Number Base Converter parses your input into a JavaScript Number with parseInt(value, fromBase), then re-emits it with toString(targetBase) for each of the six target bases. Hex output is force-uppercased for log/dump readability. Because the intermediate value is a JS Number, the converter is exact for integers in the safe range up to 2^53 − 1 (about 9 quadrillion). Negative decimals work; fractions and floats do not - parseInt truncates at the decimal point.

How the Number Base Converter Works

Bases 2, 8, 10 and 16 are the everyday programmer ones - bit patterns, file permissions, decimal arithmetic and memory dumps respectively. Base 36 (0–9, a–z) is the densest case-insensitive alphanumeric encoding and is common for short URL slugs and IDs. Base 32 here is the plain numeric radix (different from Crockford/RFC 4648 Base32). BCD encodes each decimal digit separately into 4 bits, used in hardware displays and financial systems. Gray code (reflected binary) ensures adjacent values differ by exactly one bit - critical for rotary encoders and error detection.

Frequently Asked Questions

What is the largest number this can convert accurately?

JavaScript Numbers are IEEE-754 double-precision, so the safe integer range is ±(2^53 − 1) - 9,007,199,254,740,991. Beyond that, parseInt loses precision and bits start dropping. Use a BigInt-based tool for 64-bit or 128-bit values.

Why is the hex output uppercase?

Convention for log files, hexdumps and memory inspectors - uppercase A–F is easier to distinguish from lowercase b/d/e at a glance. Hex is case-insensitive, so the output pastes cleanly into any tool that accepts hex.

Are negative numbers and fractions supported?

Negative decimal input works (and is shown as a leading '-' in the other bases). Fractions and floating-point values do not - parseInt strips anything from the decimal point onward, so 3.75 in decimal becomes 11 in binary, not 11.11.

What's base 32 and base 36 actually used for?

Base 36 (0–9, a–z) gives the most compact alphanumeric encoding for short identifiers like URL slugs and Reddit IDs. Base 32 here is the plain numeric radix - note that's different from RFC 4648 / Crockford Base32, which use a custom alphabet for case-insensitive transport.

What is BCD (Binary-Coded Decimal)?

BCD encodes each decimal digit independently into a 4-bit group. So 42 in BCD is 0100 0010 - the digit 4 as 0100 and the digit 2 as 0010. BCD avoids the decimal-to-binary rounding issues that plague floating-point; it's used in financial systems, digital clocks, calculators, and hardware displays where each digit needs to be independently readable.

What is Gray code and what is it used for?

Gray code (reflected binary code) is a binary encoding where consecutive integers differ by exactly one bit. For example: 0→00, 1→01, 2→11, 3→10. This property eliminates the "glitch" window that normal binary has when multiple bits change simultaneously. It's used in rotary encoders, error correction, and Karnaugh map minimisation.

Bookmark this Number Base Converter for the next time you need binary, hex, BCD, Gray code, or bitwise operations in your browser.