From:

Input

0 chars

Output

0 chars

How to Use the Base Converter

Select the input base (BIN, OCT, DEC, or HEX), then type or paste your number. The tool converts it to all four bases in real time. Common prefixes like 0x, 0b, and 0o are automatically stripped.

Supported Number Bases

  • Binary (BIN) — Base 2, digits 0-1. Used by computers at the hardware level; every value in memory is ultimately stored as binary.
  • Octal (OCT) — Base 8, digits 0-7. Common in Unix file permissions (e.g., chmod 755) and some legacy systems.
  • Decimal (DEC) — Base 10, digits 0-9. The standard number system used in everyday arithmetic.
  • Hexadecimal (HEX) — Base 16, digits 0-9, A-F. Widely used in programming for memory addresses, color codes, and byte values.

Real-World Use Cases

  • Color codes — HTML/CSS colors like #FF5733 are hex. Each pair of hex digits (FF, 57, 33) represents the red, green, and blue channel values in decimal (255, 87, 51).
  • File permissions — Unix permissions like chmod 755 use octal. 7 = read+write+execute (binary 111), 5 = read+execute (binary 101).
  • Memory addresses — Debuggers and disassemblers display addresses in hex (e.g., 0x7ffee4b2c8a0) because it maps cleanly to byte boundaries.
  • Bitwise operations — When working with flags or bitmasks, converting between binary and hex helps visualize which bits are set.
  • Network addresses — IPv6 addresses are written in hexadecimal. Understanding base conversion helps read and manipulate them.

Quick Reference: 0–15

DECBINOCTHEX
0000000
1000111
2001022
3001133
4010044
5010155
6011066
7011177
81000108
91001119
10101012A
11101113B
12110014C
13110115D
14111016E
15111117F

FAQ

What number bases are supported?

Binary (base 2), Octal (base 8), Decimal (base 10), and Hexadecimal (base 16).

Is there a size limit?

The tool uses BigInt for arbitrary precision, so it can handle very large numbers. Input is limited to 1MB.

Is my data safe?

Yes. All conversion happens in your browser. No data is sent to any server.

How do I convert a hex color to RGB?

Split the hex code into three pairs and convert each from hex to decimal. For example, #1A2B3C → R: 1A = 26, G: 2B = 43, B: 3C = 60. Paste each pair into this tool with HEX selected to get the decimal value instantly.

Why does programming use hexadecimal so often?

One hex digit represents exactly 4 binary bits (a nibble), so two hex digits represent one byte (8 bits). This makes hex a compact and readable shorthand for binary data — far easier to scan than a long string of 0s and 1s.

Related Articles