Base Converter (Bin/Oct/Dec/Hex)
Convert any integer between binary (2), octal (8), decimal (10), and hexadecimal (16).
Result
All bases
Bin: 11111111
Oct 377 · Dec 255 · Hex FF.
- Input255 (base 10)
- Decimal255
- Binary11111111
- Octal377
- HexadecimalFF
- Bit length8
- 0x notation0xFF
- 0b notation0b11111111
Step-by-step
- Parse "255" as base 10 → decimal 255.
- Convert to other bases.
How to use this calculator
- Enter value (with or without 0x/0b prefix).
- Pick the base of the input.
- Read all four common bases.
About this calculator
Number bases (radices) express the same integer with different digit symbols. Binary (base 2): only 0 and 1, foundation of digital computers. Hex (base 16): 0-9, A-F, used for memory addresses and color codes. Octal (base 8): rare today except Unix file permissions. Conversion is mechanical: parse from any base, output in any. JavaScript built-ins handle bases 2-36.
Frequently asked
Each hex digit = 4 bits. 8-bit byte = 2 hex digits (00 to FF). Easier to read than long binary strings.
Related calculators
Scientific Notation Converter
Convert decimal ↔ scientific notation. Standard form a × 10^b with 1 ≤ |a| < 10.
Modulo Calculator (a mod n)
a mod n: remainder of a divided by n. Always non-negative for positive n.
Complex Number Arithmetic
(a + bi) ± (c + di), ×, ÷. Real part, imaginary part, modulus, argument.
Big-O Time Complexity Calculator
Operations vs. n for common Big-O classes: O(1), O(log n), O(n), O(n log n), O(n²), O(2ⁿ).
GCD (Greatest Common Divisor) Calculator
Euclidean algorithm: gcd(a,b) = gcd(b, a mod b). Supports 2-6 integers.
Prime Factorization Calculator
n = p₁^a₁ × p₂^a₂ × … Trial division to find all prime factors with multiplicity.