GWN Tools · Converters

Number Base Converter

Convert a value between binary, octal, decimal, and hexadecimal. Enter a number, pick its base, see all four. Runs entirely in your browser.

Binary
Octal
Decimal
Hex

Handles whole numbers. Hex shown in uppercase.

About the number base converter

What is a number base converter? A number base converter rewrites the same quantity in different bases — binary, octal, decimal, and hexadecimal — so you can read a value however you need it. Enter a number in any base and see all four equivalents at once.

What is a number base?

A number base, or radix, is how many distinct digits a system uses to represent numbers. Decimal is base 10 (digits 0–9), binary is base 2 (0–1), octal is base 8 (0–7), and hexadecimal is base 16 (0–9 then A–F). The same quantity can be written in any base.

How do I convert between binary, decimal, and hexadecimal?

Type a value, choose which base it is written in, and the converter shows the equivalent in binary, octal, decimal, and hexadecimal at once. Internally it reads the value with parseInt(value, base) and writes each result with Number.prototype.toString(targetBase).

What does 255 in decimal look like in hexadecimal and binary?

Decimal 255 is FF in hexadecimal and 11111111 in binary, and 377 in octal. It is the largest value that fits in a single 8-bit byte.

Why does the hex output use uppercase letters?

Hexadecimal uses the letters A through F for the values 10 through 15. This converter displays them in uppercase (for example FF rather than ff) for readability, but both forms represent the same number and are accepted as input.