Skip to content
OddsockLocal
Local
Input base (2–36)
16
Output base (2–36)
10

255

Calculated as you typeRuns in this browser. Nothing is uploaded.

Ready

How to use

  1. Enter the integer digits, without a 0x or 0b prefix. A leading minus is allowed.
  2. Set the input base and the output base, each from 2 to 36.
  3. Read the converted integer. Letters in the output are lowercase.

What is Number bases?

Hexadecimal ff is 15 sixteens plus 15, which is 255 in decimal. The page reads the integer in the input base and writes it in the output base, using exact integer arithmetic, so a long hex string does not pass through a rounded float. Bases run from 2 to 36. Digits past 9 are letters, a for 10 through z for 35. A digit that is too large for the source base is rejected: the character 2 is illegal in base 2.

Read more

A leading minus is preserved. FF and ff are the same value. The output is lowercase. Binary, octal, decimal, and hex are the common cases, and they are just bases 2, 8, 10, and 16. There is no 0x prefix and no 0b prefix. Type the digits alone.

This is for integers. A hex colour such as #ffcc00 is three bytes, not one integer, unless you deliberately want the 24-bit number. Fractional bases and fractional values are outside the tool. Text-to-hex, where each character becomes a byte, is an encoding tool, not a change of base.

Use cases

  • A student turning hex ff into decimal 255.
  • A programmer checking a binary value before dropping it into a mask.
  • Someone converting a base-36 id back to decimal.
  • A teacher showing that the digit 2 cannot appear in a binary string.
  • A firmware reader stripping a 0x prefix and converting the rest.

Hex ff to decimal

Integer ff. Input base 16. Output base 10.

255. That is 15 × 16 + 15.

Why use Oddsock

Oddsock runs this in your browser. It is free, it does not upload the work, and it does not ask for an account.

Related tools

Using this tool

255. In base 16, f is 15, so ff is 15 × 16 + 15.