Number Base Converter
Convert between binary, octal, decimal, and hex
What is a Number Base Converter?
Converts a number from any selected base, binary, octal, decimal or hexadecimal, into all four representations at once. Type 255 as decimal and instantly see 11111111 in binary, 377 in octal and FF in hex; switch the Input Base to binary and paste 11111111 to go the other way. Built for programmers decoding bitmasks and subnet masks, students learning place-value systems, and engineers translating memory addresses and permission bits.
How to Use This Tool
- Type the Number, Enter the value to convert, e.g. 255, 11111111 or FF, without any 0x or 0b prefix.
- Select the Input Base, Tell the tool which base your input is written in: Decimal (10), Binary (2), Octal (8) or Hexadecimal (16).
- Click Convert, Decimal, Binary, Octal and Hexadecimal rows appear together instantly.
Understanding the Results
Decimal, Binary, Octal and Hexadecimal (uppercase) all describe the same value, 255, 11111111, 377 and FF are one number in four spellings. If any digit is illegal in the selected base (e.g. 2 or 9 typed as binary), you get an Error row, Invalid number for selected base, instead of conversions.
Tips & Best Practices
• Always set Input Base to match what you pasted: the classic mistake is leaving Decimal selected while converting a hex dump, FF as decimal is invalid, as hexadecimal it is 255.
• Strip 0x, 0b and 0o prefixes before converting; the tool expects bare digits for the chosen base.
• Subnet work shortcut: convert each octet (e.g. 255 → 11111111) to eyeball CIDR boundaries and wildcard masks without a calculator.
Frequently Asked Questions
Different bases suit different jobs: binary exposes individual bits for masks and flags, hex compacts binary 4-to-1 for memory addresses and color codes, octal persists in Unix permission bits, and decimal is for human-readable arithmetic. Fluency across all four is core digital literacy.
At least one digit is illegal in the chosen base: binary allows only 0 and 1, octal 0–7, decimal 0–9, and hexadecimal 0–9 plus a–f. Typing 9 while Binary is selected, or g while Hexadecimal is selected, triggers this, fix the digits or switch the Input Base.
Select Hexadecimal (16) as the Input Base, type FF (upper or lower case both work), and click Convert, Decimal reads 255, Binary 11111111, Octal 377. Leave off the 0x prefix; bare digits only.
No. Conversion is integer arithmetic in your browser, the number never leaves your device, and closing the tab clears it from memory.
Sized this for your site?
Free engineers turn these numbers into a working design, topology, hardware and quote included.