Base Number Converter — Binary, Decimal, Hex, Octal

Convert numbers between binary, octal, decimal and hexadecimal bases with full working shown.

About this calculator

A base number converter translates integers between binary (base 2), octal (base 8), decimal (base 10), hexadecimal (base 16), and arbitrary bases between 2 and 36. Base conversion is essential in computer programming, networking (IP addresses, MAC addresses), and digital electronics.

Hexadecimal is the most common in programming: it compactly represents binary (each hex digit = 4 binary bits) and is the standard format for memory addresses, colour codes (#FF5733), and file format byte sequences.

Worked example

Inputs: Convert 255 (decimal) to other bases

  1. Binary: 11111111 (8 ones — the maximum value of an 8-bit byte)
  2. Octal: 377
  3. Hexadecimal: FF
  4. In computing: an 8-bit unsigned integer holds 0–255, fitting exactly in 2 hex digits

Frequently asked questions

Why is hexadecimal preferred over binary in programming?

Binary is unreadable for humans beyond a few digits. Hex compresses every 4 binary digits into 1 hex digit (0–9, A–F) — so a 32-bit value (32 binary digits) is just 8 hex digits, easy to read and write. This is why memory dumps, network packets, and machine code are always displayed in hex, not binary.

What is base-64 used for?

Base-64 encoding uses 64 characters (A–Z, a–z, 0–9, +, /) to represent binary data as text. It is essential for embedding binary content (images, files, certificates) in text-only protocols like email (MIME), JSON, and URLs. Base-64 increases data size by ~33% in exchange for safe text-based transport.

Related calculators

Hash Generator Equation Solver Prime Factorisation

More calculators

EMI Calculator Mortgage Calculator SIP Calculator Compound Interest GST / VAT Calculator Salary Calculator Unit Converter Currency Converter Scientific Calculator Concrete Calculator Paint Calculator Tile Calculator Calorie / TDEE Body Fat Macro Calculator O-Ring Sizes Bolt & Nut Sizes Pipe Sizes Wire Gauge AWG Needle Gauge Chart IV Cannula Sizes Suture Sizes Catheter French Sizes Drug Dosage See all 90+ calculators ›