How to use
- Choose Encode to turn text into Base36, or Decode to turn Base36 back into text.
- Type or paste your input, or open a small file (up to about 20 KB).
- Turn on Uppercase if you need capital letters in the output.
- Copy the result or download it as a file.
What is Base36?
Base36 writes data with the ten digits and the 26 letters of the Latin alphabet, 0-9 followed by a-z. It is the largest alphabet you can build from digits and letters while ignoring letter case, so Base36 strings survive systems that change or ignore case. Each character carries about 5.17 bits, which makes the output roughly 1.55 times the size of the input, a little shorter than Base32.
Because 36 is not a power of two, the bytes cannot simply be cut into bit groups. Instead the tool reads the whole input as one large unsigned number and converts it to base 36, the same method Base58 uses. A number would lose its leading zero bytes, so each one is written as a leading 0 and restored when decoding. This arithmetic gets slow for large inputs, so the tool accepts up to about 20 KB.
Where Base36 is used
- Short IDs. URL shorteners, order numbers and ticket codes often show a numeric database ID in base 36. Reddit, for example, uses base 36 for its post and comment IDs.
- Case-insensitive places. DNS names and some file systems ignore letter case. IPFS uses a Base36 form of some identifiers in subdomain gateway addresses for this reason.
- Numbers in code. Base 36 is the highest radix that most programming languages support natively for integer conversion.
If letter case is preserved and you want the shortest alphanumeric string, Base62 is more compact.
Base36 numbers in code
This page encodes bytes. To convert an integer, use the built-in functions of your language or the number base converter:
// JavaScript
(1000000).toString(36) // 'lfls'
parseInt('lfls', 36) // 1000000
123456789012345678901234567890n.toString(36) // BigInt for large values
# Python
int('lfls', 36) # 1000000
# there is no built-in for the reverse direction
parseInt loses precision above Number.MAX_SAFE_INTEGER; for larger values, accumulate the digits into a BigInt yourself.
Specification
| Alphabet | 0-9 a-z |
|---|---|
| Output size | About 155% (big-number conversion) |
| Padding | None |
| Standard | No formal standard |
| Case sensitive | No |
Examples
| Input (UTF-8) | Output |
|---|---|
Hello, World! | fg3h7vqw7een6jwwnzmp |
Base64.is | 76f8bz4veeatf7 |
你好 | 2h5exfqm65 |
Frequently asked questions
Is Base36 case sensitive?
No. The output is lowercase by default, and the Uppercase option switches it to capitals. The decoder accepts either case.
Why does another tool give a different Base36 result?
Base36 has no formal standard. Some tools encode a number, others encode bytes, and they treat leading zero bytes differently. This tool encodes the input bytes as one big number and writes each leading zero byte as a 0.