Skip to content
ToolsNow
Guides All tools
Math

Base converter — binary, octal, decimal and hexadecimal

Convert a number between binary, octal, decimal, hexadecimal, base 32 and base 36 — with invalid digits caught rather than silently ignored.

Runs entirely in your browser — nothing is uploaded.

Binary (base 2)11111111
Octal (base 8)377
Decimal (base 10)255
Hexadecimal (base 16)FF
Base 32 (base 32)7V
Base 36 (base 36)73
Decimal value: 255 · 8 bits

How to use

  1. Enter your number. A 0x, 0b or 0o prefix is stripped automatically.
  2. Say which base it is in. Every other representation appears at once.
  3. Copy the one you need. Each row has its own copy button.

Questions

How do I convert binary to decimal by hand?

Each position is a power of two, read right to left. 1010 is (1×8) + (0×4) + (1×2) + (0×1) = 10.

Why is hexadecimal used so much in computing?

Because one hex digit maps exactly to four bits, so a byte is always exactly two hex digits. That makes binary data compact to write and easy to read back — which is why colours, memory addresses and hashes all use it.

What happens if I enter an invalid digit?

You get told which character is wrong. This matters: JavaScript’s own parseInt silently stops at the first invalid character, so parseInt("12x", 10) returns 12 rather than an error — a real source of bugs.

What is base 36?

Digits 0–9 followed by letters a–z, giving the most compact representation using only alphanumerics. It is common in short URLs and generated IDs.

Related tools