Convert a value between binary, octal, decimal, and hexadecimal. Enter a number, pick its base, see all four. Runs entirely in your browser.
Handles whole numbers. Hex shown in uppercase.
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.
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.
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).
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.
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.