ToolFox

Number Base Converter

Convert a whole number between binary, octal, decimal and hexadecimal, with a copy button for each result.

Binary
11111111
Octal
377
Decimal
255
Hexadecimal
ff

How it works

Enter a value and tell the tool which base it is written in (binary, octal, decimal or hexadecimal); it is parsed as an arbitrary-precision integer and re-expressed in all four bases at once. Only the digits valid for the chosen base are accepted — for example "2" is rejected as binary — and only unsigned (non-negative) whole numbers are supported, matching how bases are normally used in programming.

Example

Enter ff with "From base" set to Hexadecimal and you instantly see decimal 255, binary 11111111 and octal 377 — handy for reading colour codes, permission bits or memory addresses in whichever base you think in.

Frequently asked questions

Can I convert negative numbers?

No — this tool covers unsigned (non-negative) integers only, which covers the common cases of colour codes, bit flags and memory addresses.

Is hex input case-sensitive?

No — both "ff" and "FF" are accepted and treated identically as hexadecimal input.

What happens with digits that don't belong to a base?

They are rejected with an error — for example "2" is not a valid binary digit, since binary only uses 0 and 1.

Is there a size limit?

No practical one — the conversion uses arbitrary-precision integers, so very large numbers convert exactly rather than losing precision.

Related tools