Base62
Base62 represents numbers with 62 characters (0-9, a-z, A-Z); it is case-sensitive, denser than Base36, and widely used for short links and ID generation.
Purpose
It maximizes the radix under an alphanumeric-only constraint (no special characters), producing URL-safe, compact short codes.
Mechanism
A non-negative integer is repeatedly divided by 62; remainders 0-9 map to 0-9, 10-35 to a-z, and 36-61 to A-Z. Decoding expands by positional weight. It applies to integers only.
Use cases
- Short-link services (bit.ly style)
- Distributed ID generation (e.g., hashids)
- Invitation and coupon codes
- URL-friendly database primary keys
Examples
- Input
1234567890Output1ly7vkDecimal to Base62
Common errors
- Case sensitivity causing user input errors
- Prefer Base36 for human input scenarios, or add a checksum
Related terms
Base36
Base36 represents numbers with 36 characters (0-9 and a-z), mixing digits and letters, and is commonly used for short links and compact IDs. GLOSSARY
Base58
Base58 is a human-oriented binary-to-text encoding using 58 characters (dropping the easily confused 0, O, I, l, +, and / from Base64), best known for cryptocurrency addresses. GLOSSARY
Base64
Base64 maps arbitrary binary data onto 64 printable ASCII characters (A-Z, a-z, 0-9, +, /) so that binary data can travel over text-only channels. GLOSSARY
Related tools
Base Converter
Convert numbers between any base (2-36). Free, private, 100% client-side. TOOL
Random Bytes Generator
Generate cryptographically secure random bytes or integers. Free, private, and 100% client-side. TOOL
Base62 Decode
Base62 Decode — pure client-side tool. Privacy-first, no server round-trip. TOOL