> encode | decode | compress <
// Base62 encoding for URL-safe, compact data representation
Local Processing
100% client-side Base62 encoding. Your data never leaves your browser.
URL-Safe
No special characters like +, /, or =. Perfect for URLs and file names.
Bidirectional
Both encode and decode functionality. Reversible data transformation.
// ABOUT BASE62 ENCODING
How Base62 Works:
Base62 uses 62 characters (0-9, A-Z, a-z) to represent data. It converts binary data into a compact, URL-safe string without special characters.
Example:
"Hello" → 5TP3P3v
Why Use Base62:
- >URL-safe without encoding
- >No special characters (+, /, =)
- >Shorter than hexadecimal
- >Perfect for database keys
- >Human-readable format
>> frequently asked questions
Q: What is Base62 encoding?
A: Base62 encoding uses 62 characters (0-9, A-Z, a-z) to represent data. Similar to Base64 but without special characters (+, /, =), making it URL-safe and filename-friendly.
Q: How does Base62 differ from Base64?
A: Base62 uses 62 characters vs Base64's 64. Base62 avoids special characters, making it URL-safe without encoding. Base64 is more compact but requires URL encoding.
Q: When should I use Base62?
A: Use Base62 for URL slugs, file names, database keys, or any situation where you need compact, URL-safe encoding without special characters.
Q: Is Base62 encoding reversible?
A: Yes, Base62 encoding is completely reversible. Encoded data can be decoded back to its original form without any loss.
Q: How efficient is Base62 encoding?
A: Base62 is about 20% larger than Base64 but eliminates the need for URL encoding. Often more efficient overall for web applications.
Q: How do I decode Base62 online?
A: Paste any Base62 string (0-9, A-Z, a-z — no +, /, or =) into the input and press [DECODE]. Our Base62 online decoder runs entirely in the browser, so database keys, short-link IDs, and session tokens never leave your device. To decode a large integer instead, treat the string as a radix-62 number: parseInt(s, 62) in some languages, or write a tiny loop that multiplies by 62 and adds each digit value.
Q: How do I encode/decode Base62 in JavaScript, Python, and Java?
A: Unlike Base36, Base62 is not built into most standard libraries — you typically need a 20-line helper or a package.
JavaScript: npm i base62 → require('base62').encode(123456); or write const abc = '0...9A...Za...z'; and iterate.
Python: pip install pybase62 → base62.encodebytes(b'...').
Java: use io.seruco.encoding:base62 or BigInteger.toString(62) — though Java's built-in toString(radix) maxes out at radix 36, so you need a custom alphabet.
For one-off decoding, this online tool handles it instantly.
Q: decodificador Base62 en español — ¿cómo funciona?
A: Un decodificador Base62 toma una cadena de 62 caracteres (dígitos 0-9 y letras A-Z, a-z) y la convierte de nuevo a bytes o a un entero. Pega tu cadena en el recuadro izquierdo y pulsa [DECODE]. El decodificar Base62 se realiza íntegramente en tu navegador — ningún servidor ve los datos. Es el método habitual para URL acortadas, IDs de YouTube-like, y claves primarias ocultas en APIs REST. Base62 no contiene caracteres especiales, por lo que no necesitas encodeURIComponent al usarlo en una URL.
Q: Base62 在线解码怎么操作?
A: 把 Base62 字符串(0-9、A-Z、a-z,不包含 +///=)粘贴到左侧输入框,点击 [DECODE] 即可。Base62 在线解码 工具全部运行在你的浏览器中,短链 ID、数据库主键、访问令牌都不会上传。
常见用途:
• 短链服务(bit.ly、t.co)用 Base62 把大整数自增 ID 变成 6-8 字符的短串。
• 数据库主键混淆:把 user.id=42 编码为 g,避免暴露顺序。
• Instagram media ID、Flickr short URL 都使用 Base62 或其变体。
Q: Why choose Base62 over Base58 or Base64?
A: Each variant sacrifices different characters for different goals:
• Base64 (RFC 4648): most compact, but contains +, /, = → needs URL encoding in query strings.
• Base64url: replaces +→- and /→_ — safe in URLs but still has two non-alphanumeric characters.
• Base62: strictly alphanumeric, ~17% longer than Base64, but no URL encoding needed anywhere.
• Base58 (Bitcoin): drops look-alikes 0, O, I, l → human-safe to read aloud, ~5% longer than Base62.
Choose Base62 when you want alphanumeric only without the readability tradeoff of Base58.
Q: Is Base62 case-sensitive?
A: Yes — Base62 is case-sensitive. A and a are different symbols representing different values (10 and 36 respectively). This doubles the symbol space compared to case-insensitive Base36. If you need case-insensitive storage (e.g., DNS labels, email-safe tokens), use Base36 instead; otherwise Base62 gives you shorter output.
Q: Base62 encode / decode — are there any standards?
A: No. Unlike Base64 (RFC 4648) or Base58 (Bitcoin's well-known alphabet), Base62 has no official RFC. Different libraries use different character orderings:
• Most common: 0-9A-Za-z (digits, then uppercase, then lowercase).
• Alternate: 0-9a-zA-Z.
• Some URL shorteners use A-Za-z0-9.
This matters when interoperating — always confirm the alphabet. Our tool uses 0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz (the most common), but you can configure a custom alphabet in the CUSTOM CHARSET field.