Number Base Converter
Convert whole numbers between binary, octal, decimal and hexadecimal — exact even for very large values — in your browser.
Suggested tools
About Number Base Converter
Number Base Converter converts whole numbers between binary (base 2), octal (base 8), decimal (base 10) and hexadecimal (base 16), showing all four at once along with the number of bits. It is useful for programming, networking, electronics and computer-science homework.
It uses arbitrary-precision arithmetic, so very large numbers — 64-bit values, hashes, big IDs — convert exactly without rounding. Prefixes such as 0x, 0o and 0b, negative numbers, and underscores or spaces used as separators are all accepted. Everything runs locally in your browser — the text you paste is never uploaded.
How to use Number Base Converter
- Choose the base of your input number.
- Type the number — for example FF, 0b1010 or 255.
- Read the binary, octal, decimal and hex results and copy the one you need.
Key features
- Binary, octal, decimal and hexadecimal
- Exact results for very large numbers
- Accepts 0x / 0o / 0b prefixes and separators
- Shows the bit length
Example
255
Binary: 11111111 Octal: 377 Hex: FF Bits: 8
When to use Number Base Converter
- Converting hex colour or memory values to decimal.
- Reading binary flags and bit masks.
- Checking homework in computer science and digital electronics.
Tips and common problems
- Prefixes 0x, 0o and 0b are understood automatically.
- Underscores and spaces in long numbers are ignored, e.g. 1111_0000.
- The bit count tells you the smallest integer type that can hold the value.
Frequently asked questions
No. It converts whole numbers (integers), which is what base conversion is normally used for in programming.
With a minus sign (for example -FF), not in two's complement. To get the two's complement form, add 2ⁿ for your bit width (e.g. 256 for 8 bits).
It tells you how many bits are needed to store the number — handy for choosing between 8, 16, 32 or 64-bit types.