Number Base Converter: Binary, Hex, Octal

Use this number base converter to switch numbers between binary, octal, decimal and hexadecimal, or any base from 2 to 36. Type in any field and the others update instantly. It is handy for programming, networking and computer science classes.

Number Base Converter

Base 2 to 36, exact.

-
Everything runs in your browser. Nothing you enter or upload is sent to a server.

How to use the Number Base Converter

  1. Type a whole number.
  2. Choose its base.
  3. Choose the base to convert to.
  4. Read binary, octal, decimal and hex in the list.

How it works

The digits are read one by one, multiplying the running total by the base and adding each digit (0-9 then a-z for 10-35). BigInt arithmetic keeps huge numbers exact. The result is written back by repeated division.

Example

255 in decimal is 11111111 in binary, 377 in octal and FF in hex.

Frequently asked questions

What digits does hex use?

0-9 and A-F, where A = 10 and F = 15.

Can I convert negative numbers?

Yes, with a leading minus sign.

Does it support fractions?

No, whole numbers only.

See also: Binary Calculator, Hex Calculator.

Convert number bases

How to use it

  1. Type a number in any base.
  2. See the other bases update.
  3. Pick a custom base if needed.
  4. Copy the result.

More questions

What is 255 in hex?

255 in hex is FF, the largest value that fits in one byte.

Can it handle big numbers?

Yes. It handles very large whole numbers without rounding.

Does it do fractions?

No. It works with whole numbers only, not fractions.

Related tools: Binary Calculator, Text to Binary Converter, HEX to RGB Converter.