Base Converter (Bin/Oct/Dec/Hex)

Convert any integer between binary (2), octal (8), decimal (10), and hexadecimal (16).

Inputs

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

  1. Parse "255" as base 10 → decimal 255.
  2. 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