Skip to content

Number Base Converter

Convert numbers between binary, octal, decimal, and hex.

Result (Base 16)

FF

All Common Bases

Binary Visualization

1111 1111

Common Conversions

DecimalBinaryOctalHex
00000 000000x0
10000 000110x1
20000 001020x2
40000 010040x4
80000 1000100x8
160001 0000200x10
320010 0000400x20
640100 00001000x40
1281000 00002000x80
2551111 11113770xFF
2560001 0000 00004000x100
10240100 0000 000020000x400

About the Number Base Converter

Convert numbers between binary, octal, decimal, and hexadecimal. Every base describes the same quantity in a different notation, and moving between them is routine when reading memory addresses, decoding permission bits, or working with color values and bitmasks.

How to use it

  1. 1 Enter a number in whichever base you have.
  2. 2 Every other base updates simultaneously.
  3. 3 Use the bit view to see the binary representation laid out.
  4. 4 Copy whichever representation you need.

What it does

  • Binary, octal, decimal and hexadecimal at once
  • Custom bases from 2 to 36
  • Bit-level visualisation
  • Large-number support beyond 32 bits

Frequently asked questions

Is my input sent anywhere?

No. Every calculation happens locally in your browser using JavaScript. Nothing you paste is uploaded, logged, or stored on a server, which makes the tool safe to use with production data, credentials, and customer records.

Why do programmers use hexadecimal?

Because one hex digit maps exactly to four bits, so a byte is always two hex digits and the conversion is done by eye. Decimal has no such alignment — 255 gives no hint that it is all eight bits set, while 0xFF is immediately obvious.

What do the 0x, 0b and 0o prefixes mean?

They tell a compiler which base a literal is written in: 0x for hexadecimal, 0b for binary, 0o for octal. Without a prefix, a leading zero means octal in C and several older languages, which is why 010 equals 8 and not 10 — a genuine source of bugs.

Where is octal still used?

Mainly Unix file permissions, where each digit encodes read, write, and execute as three bits — chmod 755 is exactly that. Outside permission bits and a few legacy formats, hexadecimal has replaced it everywhere.

How do I convert hex to decimal by hand?

Multiply each digit by 16 raised to its position from the right, then sum. For 0x1F: F is 15 at position 0, so 15 × 1 = 15; 1 is at position 1, so 1 × 16 = 16; the total is 31.