Conversion Results

Binary (Base 2)—
Octal (Base 8)—
Decimal (Base 10)—
Hexadecimal (Base 16)—

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

1

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.

2

Choose the Target Base

Select the output base you need. The converted value appears across all bases at once, no need to convert separately.

3

Copy Whichever Base You Need

Click Copy next to any converted value to use it in your code, documentation, or calculations.

Conversion Example

Example: Converting 255

Input (decimal):

255

Converted to all bases:

Decimal:     255
Hexadecimal: FF
Octal:       377
Binary:      11111111

Frequently Asked Questions

How do I convert a binary number to decimal?

Paste or type the binary number in the input. The tool 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.

Are the numbers I type uploaded?

No. Converting between binary, octal, decimal and hex is simple arithmetic done by the page itself, so nothing you type goes over the network.

Why do programmers use octal?

Mostly for Unix file modes. In chmod 755 each digit is one group (owner, group, others) and each digit is three bits: read 4, write 2, execute 1, so 7 means rwx and 5 means r-x. Pick Octal (Base 8) in the menu and type 755: the binary row shows 111101101, the same pattern ls -l prints as rwxr-xr-x. One quirk to watch: the parser stops at the first digit the base does not allow, so 758 in octal mode quietly reads as 75.

Related Tools