Skip to content
APK Peer

Number Base Converter

Free · runs in your browser · nothing uploaded

Quick answer

This number base converter changes numbers between binary (base 2), octal (base 8), decimal (base 10) and hexadecimal (base 16) instantly. Enter a number, choose the base it's written in, and see all four forms at once. It handles very large numbers exactly, which suits programming, networking and computer science homework.

Binary (base 2)
11111111
Octal (base 8)
377
Decimal (base 10)
255
Hexadecimal (base 16)
FF

How to convert between bases

  1. Type a number in the Number box.
  2. Choose which base it's written in: binary, octal, decimal or hexadecimal.
  3. All four versions appear at once. Copy the one you need.

Prefixes such as 0x, 0b and 0o are removed automatically, along with spaces and underscores used to group digits. Very large numbers are converted exactly, without rounding.

The four common bases

BaseDigits usedExample (255)Where you see it
Binary (2)0–111111111How computers store data
Octal (8)0–7377Unix file permissions
Decimal (10)0–9255Everyday numbers
Hexadecimal (16)0–9, A–FFFColors, memory addresses, hashes

How base conversion works

In any base, each digit's value depends on its position. In decimal, 345 means 3 × 100 + 4 × 10 + 5. In binary, each position is worth a power of 2, so 1011 is 8 + 0 + 2 + 1 = 11.

Hexadecimal is popular with programmers because one hex digit equals exactly four binary digits. A byte (eight bits) is always two hex digits, from 00 to FF, which makes long binary values much easier to read.

Practical examples

  • Colors: the hex color #15803D is three bytes: 15, 80 and 3D, or 21, 128 and 61 in decimal. The color converter does this for you.
  • File permissions: chmod 755 is octal for rwxr-xr-x.
  • Networking: subnet masks like 255.255.255.0 are easier to understand in binary.

To turn text rather than numbers into binary, use the binary translator. For ancient numbering, try the Roman numeral converter.

Everything runs in your browser.

Frequently asked questions

How do I convert binary to decimal?

Each binary digit is worth a power of 2, starting from 1 on the right. Add up the values of the 1s: binary 1011 is 8 + 0 + 2 + 1 = 11. This tool does it instantly for numbers of any length.

Why do programmers use hexadecimal?

One hex digit represents exactly four binary digits, so a byte is always two hex digits. That makes hex a compact, readable way to write binary data such as colors, memory addresses and hashes.

Can I paste numbers with 0x or 0b prefixes?

Yes. Prefixes like 0x for hex, 0b for binary and 0o for octal are removed automatically, and so are spaces and underscores used to group digits.

Last updated by the APKPeer Editorial Team. Read our privacy policy for how the site handles data.