🔢 For developers & students

Convert numbers
between any base. Free.

Convert numbers between binary, octal, decimal, hexadecimal and any custom base instantly. Bit viewer included.

Binary (Base 2) Octal (Base 8) Decimal (Base 10) Hex (Base 16) Custom base Bit viewer
🔄 Type in any field — all others update instantly
Base 2 Binary
Base 8 Octal
Base 10 Decimal
Base 16 Hexadecimal
💡 Bit viewer
Enter a number above to see its binary representation
⚙️ Custom base converter
From base
To base
Result
⚡ Quick examples — click to load
255
Max byte value
0
Zero
1
One
42
The answer
128
Half byte
65535
Max 16-bit
1024
1 Kilobyte
16
Hex 0x10
How it works
01
Type in any field
Enter a number in binary, octal, decimal or hexadecimal. All other fields update instantly.
02
See all bases
All 4 base representations update in real time. Copy any value with one click.
03
View bits
The bit viewer shows each bit visually with 1s highlighted in green and 0s in gray.
04
Custom bases
Convert between any two bases from 2 to 64 using the custom base converter below.
🛡️
100% private. All conversions happen locally in your browser. No data is sent to any server.
Frequently asked questions
The converter supports the four most commonly used number bases in computing: binary (base 2, using digits 0 and 1), octal (base 8, using digits 0–7), decimal (base 10, using digits 0–9, the standard human number system), and hexadecimal (base 16, using digits 0–9 and letters A–F). You can convert freely in any direction between all four bases.
Binary is a base-2 number system that uses only two digits: 0 and 1. Computers use binary because electronic circuits have two stable states — on and off, which map naturally to 1 and 0. Every piece of data a computer processes — text, images, video, instructions — is ultimately represented as a sequence of binary digits (bits). Understanding binary is fundamental to computer science and low-level programming.
Hexadecimal (hex) is a base-16 system using digits 0–9 and letters A–F. It is widely used in computing because it provides a compact, human-readable representation of binary data — one hex digit represents exactly four binary digits (bits). Hex is used for memory addresses, color codes in CSS (#FF5733), Unicode code points, error codes, MAC addresses, and cryptographic hashes.
To convert a decimal number to binary manually, repeatedly divide the number by 2 and record the remainders from bottom to top. For example, 13 ÷ 2 = 6 remainder 1, 6 ÷ 2 = 3 remainder 0, 3 ÷ 2 = 1 remainder 1, 1 ÷ 2 = 0 remainder 1 — reading remainders upward gives 1101 in binary. The converter does this instantly for any size number, saving you from manual calculation.
Octal is a base-8 number system using digits 0–7. It was more commonly used in early computing systems. Today its primary use is in Unix and Linux file permission notation — for example, the permission code 755 in octal represents specific read, write, and execute permissions for owner, group, and others. Each octal digit represents exactly three binary digits, which maps neatly to the three-bit permission groups in Unix systems.
The converter handles numbers within JavaScript's safe integer range, which covers integers up to 2^53 − 1 (about 9 quadrillion in decimal). For most practical uses in programming, debugging, and education, this range is more than sufficient. Very large numbers used in cryptography may require specialized arbitrary-precision libraries.
The prefix 0x is a standard notation in programming languages (C, C++, Java, JavaScript, Python, and others) to indicate that a number is in hexadecimal format. For example, 0xFF means the hex value FF, which equals 255 in decimal. Similarly, 0b is used for binary (0b1101 = 13) and 0o for octal (0o17 = 15) in some languages.
Yes, regularly. Web developers work with hex color codes. System programmers read memory addresses in hex. Network engineers work with IP addresses in binary and decimal. Security professionals analyze binary data and hex dumps. Understanding base conversion is a fundamental skill for anyone working in software development, networking, or cybersecurity.
More free tools
function toggleFaq(btn) { const answer = btn.nextElementSibling; const isOpen = btn.classList.contains('open'); document.querySelectorAll('.faq-question.open').forEach(q => { q.classList.remove('open'); q.nextElementSibling.classList.remove('open'); }); if (!isOpen) { btn.classList.add('open'); answer.classList.add('open'); } }