# Number Base Converter — Binary, Octal, Decimal & Hex + Any Base 2–36

> Convert any number between binary, octal, decimal, hexadecimal and any base from 2 to 36 — with a step-by-step positional breakdown showing digit × base^place.

- **Category:** Conversions & Units
- **Interactive calculator:** https://youcalc.com/en/conversions-units/number-base-converter/
- **Price:** Free, no sign-up required

## Overview

This calculator converts any non-negative integer between binary (base 2), octal (base 8), decimal (base 10), hexadecimal (base 16) and any custom base from 2 to 36. Type a number, choose its source base, and the tool instantly shows the equivalent in all four standard bases alongside a step-by-step positional breakdown.

## How to read your result

The four result boxes at the top show the same value expressed in binary, octal, decimal and hexadecimal. Below them, the positional breakdown table explains how each digit contributes to the total: every digit is multiplied by the source base raised to the power of its position (counting from zero on the right), and the products sum to the decimal value. Read the table from the most-significant digit on the left to the least-significant on the right.

## Method

Converting from a source base to decimal uses the weighted-sum rule: each digit is multiplied by the source base raised to the power of its position, where position 0 is the rightmost digit. The products are summed to obtain the decimal value. To convert from decimal to any target base, repeated integer division is applied: divide the number by the target base, record the remainder as the next digit (from least significant to most significant), then repeat with the quotient until it reaches zero. The digits collected in reverse order give the representation in the target base. For hexadecimal, digit values 10–15 are written as uppercase A–F.

## Example

- **Setup:** Enter 255 in base 10 (decimal) and convert.
- **Result:** Binary: 11111111 — eight ones, each representing 128, 64, 32, 16, 8, 4, 2 and 1 respectively; Octal: 377; Hexadecimal: FF. All four forms represent the same integer 255.

## Frequently asked questions

### What is a number base (radix)?

A number base, or radix, defines how many distinct digits a positional numeral system uses. Base 10 uses digits 0–9, binary (base 2) uses only 0 and 1, hexadecimal (base 16) uses 0–9 and then A–F for values 10–15. The position of each digit determines its weight: the rightmost position carries weight base^0 = 1, the next carries base^1, and so on.

### Why is hexadecimal so common in computing?

One hexadecimal digit represents exactly four binary bits (a nibble), so two hex digits compactly express one byte (8 bits). Memory addresses, colour codes and cryptographic hashes are all typically written in hex because it is far more readable than a long string of ones and zeros.

### How do I convert from binary to decimal by hand?

Write the binary number, then assign each digit its positional weight — the rightmost digit has weight 2^0 = 1, the next 2^1 = 2, 2^2 = 4, and so on. Multiply each digit (0 or 1) by its weight and add the products. For example, binary 1010 = 1×8 + 0×4 + 1×2 + 0×1 = 10.

### What bases beyond 16 are used in practice?

Base 32 and base 36 appear in URL-shorteners, content hashes and serial-number encoding because they pack more information into fewer characters while using only letters and digits. Base 64 (not included here, as it uses two symbol classes) is common for binary-to-text encoding in email and web APIs.

### Why are fractions and negative numbers not supported?

Positional fractions require a radix point and an extra layer of conversion rules, while signed integers need a sign convention (two's complement, sign-magnitude, etc.) that varies by context. This tool focuses on the core conversion case — non-negative integers — to keep the result unambiguous for all bases 2 to 36.

## Related calculators

- [Unit Converter](https://youcalc.com/en/conversions-units/unit-converter/)
- [Roman Numeral Converter](https://youcalc.com/en/conversions-units/roman-numeral-converter/)

## Sources

- https://xlinux.nist.gov/dads/
- https://www.khanacademy.org/math/algebra-home/alg-intro-to-algebra/algebra-alternate-number-bases/v/number-systems-introduction

---

Interactive version: https://youcalc.com/en/conversions-units/number-base-converter/ · From YouCalc — https://youcalc.com
