Number Base Converter
Choose the input base, type an integer, and read binary, octal, decimal, and uppercase hex together. Hex may start with 0x. Invalid digits for the chosen base show an error instead of a fake conversion.
Binary11111111
Octal377
Decimal255
HexFF
About this tool
This page replaces the old decimal-only hex and binary tools. Values parse as big integers so you are not limited to 32-bit JavaScript numbers. Negative values keep a leading minus in every base.
How to use
- Pick the input base: Choose binary, octal, decimal, or hex.
- Type the value: Enter an integer in that base, such as 255 or FF.
- Read all bases: Binary, octal, decimal, and hex update together when the input is valid.
- Fix invalid input: If you see an error, the digits do not belong to the selected base.
Common use cases
- Convert a register or color channel between decimal and hex while reading docs.
- Check homework that asks for binary or hex of a decimal integer.
- Confirm a bitmask by seeing all four bases of the same integer.
Tips
- Switch Input base before pasting hex that contains A–F.
- Leading 0x, 0b, or 0o prefixes are accepted for hex, binary, and octal.
FAQ
Can I convert hex back to decimal?
Yes. Set Input base to Hex and type FF to see decimal 255 and the other bases.
Where did the binary converter go?
Binary is one of the four bases on this page. The old binary-converter URL redirects here.
Are fractions supported?
No. This tool converts integers only.
Is conversion done on a server?
No. The number is converted in your browser as you type.