All tools

Number Base Converter

Convert between binary, octal, decimal, and hexadecimal — type in any field.

0b
0o
0x

Quick reference

Dec 0–9 → Hex 0–9Dec 10 → Hex ADec 11 → Hex BDec 15 → Hex FDec 255 → Hex FFDec 255 → Bin 11111111

Understanding number bases

A number base (or radix) defines how many unique digits are used to represent numbers. Decimal (base 10) uses digits 0–9 and is the system humans use every day. Computers store data in binary (base 2) using only 0 and 1. Hexadecimal (base 16) uses digits 0–9 and letters A–F; it's a compact way to represent binary data — one hex digit maps exactly to 4 binary bits. Octal (base 8) was historically used in Unix file permission codes.

Frequently asked questions

Why is hexadecimal used in programming?

Hexadecimal is a shorthand for binary. Each hex digit represents exactly 4 bits (a nibble), so a byte (8 bits) is always exactly 2 hex digits (00–FF). This makes it far easier to read memory addresses, colour values (#RRGGBB), and bitmasks than binary, while still maintaining a direct relationship with the underlying bit patterns.

Why do Unix file permissions use octal?

Unix file permissions are stored as 9 bits (read, write, execute for owner, group, and others). Three bits map naturally to one octal digit (0–7), so the full permission set fits in exactly 3 octal digits. chmod 755 means 111 101 101 in binary — owner has all permissions, group and others have read+execute.

What is the largest number this tool converts?

The converter uses JavaScript's parseInt, which handles integers up to 2^53 − 1 (Number.MAX_SAFE_INTEGER, about 9 quadrillion in decimal). Numbers above this limit may lose precision. For arbitrary-precision conversion, a dedicated big-integer library would be needed.

Page share preview

More free image tools