Number Base Converter
Convert between binary, octal, decimal, hexadecimal, base-32 and base-36 — instantly.
Why Computers Think in Binary and Programmers Think in Hex
Every number system is just a way of representing the same underlying quantity using different symbols and positional rules. Decimal (base-10) is natural for humans because we have ten fingers. Binary (base-2) is natural for computers because electronic circuits have two stable states: on and off, represented as 1 and 0. But binary gets unwieldy fast — the decimal number 255 is 11111111 in binary, requiring 8 digits for a value any person reads in three. Hexadecimal (base-16) solves this elegantly: every 4 binary digits map to exactly one hex digit, so 11111111 in binary = FF in hex. This is why programmers use hex constantly for memory addresses, colour codes, checksums, and byte values — it is compact binary that humans can read without losing the direct bit-level correspondence.
How Positional Number Systems Actually Work
In any base-N number system, each digit position represents a power of N. In decimal, the number 347 means 3×10² + 4×10¹ + 7×10⁰ = 300 + 40 + 7. In binary, 1011 means 1×2³ + 0×2² + 1×2¹ + 1×2⁰ = 8 + 0 + 2 + 1 = 11 in decimal. In hex, digits go 0–9 then A–F (where A=10, B=11, C=12, D=13, E=14, F=15). So hex 2F means 2×16¹ + 15×16⁰ = 32 + 15 = 47 in decimal. This converter handles all the positional arithmetic for you — type any value in any supported base and see it instantly in all others. For storage-related contexts where you need to work with byte and kilobyte values alongside their hex representations, the Data Storage Converter is a natural companion.
Octal: The Forgotten Base That Still Appears in Unix
Octal (base-8) uses digits 0–7 and was important in early computing because 6-bit and 12-bit architectures divided neatly into 2-bit or 3-bit groups, making octal a natural grouping. Today, octal's main survival is in Unix/Linux file permissions. The command chmod 755 sets file permissions using octal: 7 = rwx (read+write+execute = 4+2+1), 5 = r-x (read+execute = 4+1), so 755 grants full permissions to the owner and read/execute to group and others. Every Linux administrator and developer encounters this regularly. In C and many other languages, a leading zero in an integer literal denotes octal: int x = 010; sets x to 8, not 10 — a source of subtle bugs for programmers who don't know the convention.
Hexadecimal in Everyday Programming
Hex appears throughout software development in ways that are easy to overlook once you know the pattern. Colour codes in CSS and HTML like #FF5733 encode red, green, and blue channels as hex pairs: FF = 255 red, 57 = 87 green, 33 = 51 blue. MAC addresses on network interfaces are written as six hex byte pairs separated by colons: 00:1A:2B:3C:4D:5E. IPv6 addresses are 128-bit values written as eight groups of four hex digits. SHA-256 hash values (used in blockchain and password storage) are 256-bit numbers displayed as 64 hex characters. UUID identifiers (used in databases) are 128-bit numbers in hex format with dashes. Recognising hex and being able to convert it quickly is a fundamental programming skill.
Base-32 and Base-36: Compact Encoding for Real-World IDs
Beyond the classic bases, base-32 and base-36 serve specific practical purposes. Base-32 uses 32 characters (typically A–Z and 2–7, or 0–9 and A–V) and is used in TOTP authenticator codes, Bitcoin addresses in Bech32 encoding, and file system case-insensitive identifiers — it avoids visually confusing characters like 0/O and 1/I/l. Base-36 uses all 10 digits plus all 26 letters (0–9, A–Z), making it the most compact representation using only alphanumeric characters with no special symbols. It appears in URL shorteners, serial numbers, and license key systems where short, typeable codes are needed. Converting a large decimal number to base-36 can dramatically shorten it: the decimal number 1,000,000 = base-36 "LFLS", saving five characters.
Common Conversions at a Glance
- Decimal 255 = Binary 11111111 = Octal 377 = Hex FF
- Decimal 256 = Binary 100000000 = Hex 100 (why memory sizes are powers of 2)
- Decimal 16 = Binary 10000 = Hex 10 = Octal 20
- Hex FF = Decimal 255 = the maximum value of one byte (8 bits)
- Unix permission 777 (octal) = Decimal 511 = Binary 111111111
✓Verified by ToollyX Team · Last updated June 2026
Frequently Asked Questions
Disclaimer: This converter works with non-negative integers. Fractional and negative numbers in non-decimal bases are not supported.