← Back to all tools

Number Base Converter

Convert numbers between binary, octal, decimal, and hexadecimal. Supports large numbers with BigInt precision.

Base Conversion Reference

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

Common Values in Programming

Max unsigned byte
255 = 0xFF = 1111 1111
uint8
Max signed byte
127 = 0x7F = 0111 1111
int8
Max unsigned 16-bit
65,535 = 0xFFFF = 16 bits all 1
uint16
Max signed 32-bit
2,147,483,647 = 0x7FFFFFFF = 31 bits
int32
Unix permissions 755
493 = 0x1ED = 111 101 101
rwxr-xr-x
Unix permissions 644
420 = 0x1A4 = 110 100 100
rw-r--r--

Frequently Asked Questions

What number bases are supported?

This converter supports the 4 most common bases in programming: binary (base 2, used in low-level computing), octal (base 8, used in Unix file permissions), decimal (base 10, standard human notation), and hexadecimal (base 16, used in memory addresses, colors, and byte representation).

Can this handle very large numbers?

Yes! The converter uses JavaScript BigInt for arbitrary precision arithmetic. You can convert numbers of any size — there's no practical upper limit. This is important for cryptography, hash values, and large binary data.

What are the 0b, 0o, and 0x prefixes?

These are standard programming notation prefixes: 0b for binary (0b1010 = 10), 0o for octal (0o12 = 10), and 0x for hexadecimal (0xA = 10). Most programming languages (JavaScript, Python, C, Java) use these prefixes. You can paste numbers with or without prefixes.

Why is hexadecimal so common in programming?

Each hex digit represents exactly 4 binary bits, making it a compact way to represent binary data. One byte (8 bits) is exactly 2 hex digits. This is why hex is used for memory addresses, color codes (#FF0000), MAC addresses, and byte sequences.