Number Base Converter
Convert numbers between binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16) instantly.
Conversion Results
————About Number Bases
Binary (Base 2) uses digits 0–1 and is the foundation of all digital computing. Octal (Base 8) uses digits 0–7 and is used in Unix file permissions. Decimal (Base 10) is the standard human number system. Hexadecimal (Base 16) uses digits 0–9 and A–F and is widely used in color codes, memory addresses, and encoding.
Related Tools
If you've ever stared at a hex color code, an IPv4 subnet mask in binary, or a permissions octet and had to reach for a calculator, you know the pain of juggling number bases. Every base is defined by its radix — the number of unique digits it uses. Converting between binary, octal, decimal, and hexadecimal is a core skill covered in JavaScript number handling, IP addressing (RFC 791), and computer architecture courses. This tool converts any number across all four bases simultaneously. Type once, see all four results. No server involved — everything computes locally in your browser.
How to Use the Number Base Converter
Enter Your Number
Type any number into the input field and select its base (decimal, binary, octal, or hexadecimal). The converter detects the format automatically.
Choose the Target Base
Select the output base you need. The converted value appears instantly across all bases at once — no need to convert separately.
Copy the Result
Click Copy next to any converted value to use it in your code, documentation, or calculations.
Conversion Example
Example: Converting 255
Input (decimal):
255Converted to all bases:
Decimal: 255
Hexadecimal: FF
Octal: 377
Binary: 11111111Frequently Asked Questions
How do I convert a binary number to decimal?
Paste or type the binary number in the input. The tool instantly shows the decimal equivalent. For example, 1010 in binary equals 10 in decimal (1×8 + 0×4 + 1×2 + 0×1).
What is hexadecimal used for in programming?
Hex is used for memory addresses, color codes (like #FF5733), bitmasks, byte-level data inspection, and encoding. It's compact — one hex digit represents exactly four binary bits. In JavaScript, <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/parseInt" target="_blank" rel="noopener">parseInt()</a> can parse hex, octal, and binary strings directly using a radix argument.
Can I convert from any base to any other base here?
This tool converts between binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16) — the four most common bases in computing. All conversions happen simultaneously.
Is my input sent to a server?
No. All conversions run entirely in your browser using JavaScript. No data is transmitted anywhere.
Why do programmers use octal?
<a href="https://en.wikipedia.org/wiki/Octal" target="_blank" rel="noopener">Octal</a> (base 8) is used primarily for Unix/Linux file permissions (chmod 755, for example). Each octal digit maps to exactly three binary bits, making it convenient for representing permission sets.