Free Developer Tool

Number Base Converter

Convert signed integers and fractions across bases 2–36 without losing large-number precision. Compare binary, octal, decimal, hexadecimal, and a custom target instantly in your browser.

Base Conversion Workspace

Results update locally as you edit the value, bases, or output settings.

Spaces and underscores are ignored8 characters

Valid hexadecimal value

Parsed in base 16. Displayed results are exact.

digits (1–64)

Limits repeating fractional output; exact results may end sooner.

Selected source digits: Auto from prefix, otherwise decimal

Detected source

Base 16

Hexadecimal

Input digits

5

Excludes sign and radix point

Value type

Fraction

Positional number

Precision

24

Maximum fractional digits

Converted Values

Common bases are shown together with the selected target base.

Binary

Base 2

Exact result

0b111111100111010.1

Octal

Base 8

Exact result

0o77472.4

Decimal

Base 10Target

Exact result

32570.5

Hexadecimal

Base 16

Exact result

0x7F3A.8

Private browser conversion

Values are parsed, converted, copied, and downloaded locally without an upload.

Exact large-number arithmetic

BigInt-based rational math avoids the precision loss caused by ordinary floating-point conversion.

A hexadecimal sample is ready to convert.

How to Convert a Number Between Bases

Enter a positional number, choose its source base, and select the target base. Auto detect recognizes the common 0b, 0o, and 0x prefixes; unprefixed auto-detected values are treated as decimal. Review the target result or compare it with the common-base outputs, then copy or download the conversion report.

  1. 1. Enter the value

    Use digits valid for the source base. A leading sign and one radix point are supported.

  2. 2. Select the bases

    Choose Auto detect or an explicit source from base 2 to 36, then select the target base.

  3. 3. Copy or export

    Compare exact and truncated results, copy one value, or download every displayed base.

How Positional Number Systems Work

In positional notation, every digit is multiplied by a power of the base. For example, hexadecimal 2D equals 2 × 16¹ + 13 × 16⁰, which is decimal 45. Positions after the radix point use negative powers, so binary 101.01 equals 1 × 2² + 1 × 2⁰ + 1 × 2⁻², or decimal 5.25.

SystemBaseAllowed digitsCommon use
Binary20–1Bits, flags, and digital logic
Octal80–7Unix permissions and compact binary groups
Decimal100–9Everyday quantities
Hexadecimal160–9 and A–FMemory, colors, hashes, and machine data
Base 36360–9 and A–ZCompact human-readable identifiers

Exact and Repeating Fractional Results

A fraction may terminate in one base and repeat in another. Decimal 0.5 is exactly 0.1 in binary, while decimal 0.1 becomes a repeating binary fraction. The converter keeps the entered value as an exact rational number, generates up to the selected number of fractional digits, and labels any unfinished expansion as truncated rather than exact.

Truncation is different from rounding: the tool stops after the precision limit without changing the final digit. Increase the precision when you need more digits, but remember that a repeating representation never terminates.

Large Integers Without Floating-Point Loss

Ordinary JavaScript numbers cannot represent every integer above 9,007,199,254,740,991 exactly. This tool parses digits into BigInt values and stores fractions as a reduced numerator and denominator, so long identifiers, masks, and numeric constants remain exact within the 4,096-digit input limit. The output is a mathematical signed value, not a fixed-width two’s-complement encoding.

Prefixes, Separators, and Valid Digits

Auto detect recognizes 0b for binary, 0o for octal, and 0x for hexadecimal. Spaces and underscores are ignored, which makes long values easier to read. Letters are case-insensitive on input. Scientific notation is not interpreted as an exponent; every character is treated as a positional digit, so use the full numeric value when converting decimal scientific notation.

JavaScript Number References

The MDN documentation explains BigInt arbitrary-precision integers and binary, octal, and hexadecimal numeric literal prefixes. External references open in a new tab.

Private, Browser-Based Conversion

Number parsing, exact arithmetic, copying, and TXT report creation run locally in your browser. Values do not need to be uploaded for conversion, and refreshing the page clears the current workspace.

Continue Your Developer Workflow

Plan IPv4 networks and inspect address bits with the Subnet Calculator, compare hexadecimal digests using the Hash Generator, or encode text and bytes—not numeric values—with the Base64 Text Encoder & Decoder. For measurement conversions instead of numeral systems, use the Unit Converter.

Number Base Converter FAQs