toolery

Number base converter

Convert a number between binary, octal, decimal, and hexadecimal, with the working shown alongside the result.

Binary
—
Octal
—
Decimal
—
Hex
—
—

How it works

Every base converts through decimal: your input is parsed in its source base, then that decimal value is expressed in each target base. The same works for any base from 2 to 36 — 36 is the ceiling because that is where the ten digits and twenty-six letters run out. Base 12 and base 36 are the ones people reach for most; base 36 is common for shortening IDs, since it packs a number into the fewest characters that stay alphanumeric.

Read the full explanation
Used this in a paper or lesson?