Number base converter
| Decimal | Binary | Octal | Hex |
|---|---|---|---|
| 0 | 0 | 0 | 0 |
| 1 | 1 | 1 | 1 |
| 8 | 1000 | 10 | 8 |
| 10 | 1010 | 12 | A |
| 15 | 1111 | 17 | F |
| 16 | 10000 | 20 | 10 |
| 64 | 1000000 | 100 | 40 |
| 100 | 1100100 | 144 | 64 |
| 255 | 11111111 | 377 | FF |
| 256 | 100000000 | 400 | 100 |
| 1024 | 10000000000 | 2000 | 400 |
| 65535 | 1111111111111111 | 177777 | FFFF |
Base 36 uses all ten numerals and all twenty-six letters, which is as far as a case-insensitive alphanumeric alphabet goes. Base 62 exists by distinguishing upper and lower case, and Base64 adds two symbols on top, but those are encodings for binary data rather than positional number systems, which is why the general converter stops at 36.
A positional base uses digits worth successive powers of the base. Base 36 uses 0–9 then A–Z, which is the largest case-insensitive alphanumeric base. FF in base 16 is 255 in base 10, 11111111 in base 2 and 73 in base 36.
How to convert between bases
Converting between two arbitrary bases is done by going through decimal, which is what this tool does internally. The exception is when one base is a power of the other; hex to binary, octal to binary. Where direct digit substitution works and needs no arithmetic. That shortcut is why those particular pairs feel so much easier than, say, base 7 to base 13.
Base 36 is where the compactness argument lives: 1234567890 becomes KF12OI, ten digits down to six, which is why short identifiers and URL slugs are often generated this way. The row labelled base 32 is a positional base in the same family, using 0–9 then A–V. It is not RFC 4648 Base32, and neither is it Base64. Those encode arbitrary bytes using a chosen alphabet, which is a different job from writing a number in a base, and the base64 encoder is the tool for it.
One honest limit: the arithmetic runs in double-precision floating point, so values above 9007199254740991 stop being exact. Below that everything here is exact in every base. Fractions are refused rather than truncated, and a leading minus sign is understood.
Questions
Anything from 2 to 36. Base 36 uses 0–9 then A–Z.
Because that exhausts the case-insensitive alphanumeric digits. Higher bases need case sensitivity or extra symbols.
No. This is a positional base using 0–9 then A–V. RFC 4648 Base32 encodes bytes with A–Z and 2–7. An encoding, not a number base.
Up to 9007199254740991 exactly. Above that, double-precision arithmetic starts rounding the last digits whatever base you use.
By going through decimal internally. Only power-of-two pairs allow direct substitution.
Compact identifiers: 1234567890 becomes the six characters KF12OI.
Yes, a leading minus sign is understood.