Base-N number converter
Convert any whole number written in bases 2 through 36 and read it instantly in binary, octal, decimal, hexadecimal and base-36. Handy for developers working with hex colours, octal permissions, binary flags or compact base-36 IDs.
How it works
The tool parses your input one character at a time. Each digit uses the alphabet
0-9a-z, where a = 10 up to z = 35, and must be valid for the base you
selected. It accumulates the value with the standard positional rule:
value = value × base + digit
building an arbitrary-precision integer (BigInt). To display the result it repeatedly divides by each target base and collects the remainders, so even very large numbers convert exactly with no overflow.
Worked examples
Enter 255 as a base-10 number:
| Base | Result | Common use |
|---|---|---|
| Base 2 (binary) | 11111111 | CPU instructions, bitfields |
| Base 8 (octal) | 377 | Unix file permissions (chmod) |
| Base 10 | 255 | General decimal |
| Base 16 (hex) | ff | Memory addresses, colors (#ff0000) |
| Base 36 | 73 | Compact IDs, URL tokens |
Type ff with input base 16 and you get 255 back in decimal. Negative inputs also work: entering -ff in base 16 returns -255 in decimal.
When each base comes up in practice
Binary (base 2) shows up any time you are working with individual bits — reading CPU flags, debugging protocol headers, or writing bitmask operations. Being fluent at reading 8-bit groups (a byte is 8 binary digits) makes low-level debugging much faster.
Octal (base 8) is nearly exclusive to Unix permission notation. The permission string 755 is octal: 7 = read+write+execute, 5 = read+execute, meaning owner has full access and group/others have read+execute. Binary maps cleanly to octal because three binary bits equal one octal digit.
Hexadecimal (base 16) is the workhorse of developer tools. Hex editors, memory dumps, color codes (#ff5500), MAC addresses, and cryptographic hashes all use hex because one hex digit maps to exactly four bits, making two hex digits exactly one byte — compact and visually scannable.
Base 36 packs more information into shorter strings by using all digits and letters. It is common for auto-incrementing IDs that need to stay compact in URLs, QR codes, or user-facing reference numbers. The number 1,000,000 in decimal becomes LFLS in base 36 — half the length.
Arbitrary-precision note
The converter uses BigInt internally, so it handles numbers with hundreds of digits accurately without integer overflow. There is no upper limit tied to 32-bit or 64-bit system integers. All conversion runs locally in your browser — nothing is sent to a server.