TFT

Base36 Encoder & Decoder

Convert numbers to Base36 encoding for shorter, case-insensitive string representations, or decode Base36 strings back to their original numeric values. Ideal for URL shorteners and compact IDs.

Base36 Encoder/Decoder

Encode text to Base36 format or decode Base36 back to text

About Base36

Base36 is a numeral system that uses 36 symbols: the digits 0-9 and the letters A-Z. It's a compact way to represent large numbers using only alphanumeric characters.

Base36 is commonly used for URL shortening, generating compact identifiers, and creating human-readable codes. Unlike Base64, Base36 doesn't require any special characters, making it safe for URLs and filenames.

How the Base36 Encoder/Decoder Works

Enter a number to encode to Base36, or input a Base36 string to decode to decimal. The conversion happens instantly as you type. Supports arbitrarily large numbers.

Base36 uses digits 0-9 and letters A-Z (case-insensitive). Each character represents a value 0-35. More compact than decimal for large numbers, URL-safe without special characters.

The encoder converts decimal to Base36 by repeated division. The decoder multiplies each digit's value by powers of 36. Both operations handle big integers precisely.

When You'd Actually Use This

Creating short URLs

URL shorteners convert IDs to Base36. Database ID 12345 becomes "9IX". Shorter than decimal, uses only URL-safe characters.

Generating compact identifiers

Need short unique IDs? Encode timestamps or UUIDs to Base36. More compact than hex. Easier to read and transcribe.

License key generation

Software license keys often use Base36. Encode serial numbers compactly. Mix with checksums for validation. User-friendly compared to hex.

Database ID obfuscation

Hide sequential database IDs from users. Encode to Base36 for URLs. Prevents guessing other record IDs. Simple obfuscation layer.

Spreadsheet column conversion

Excel columns are Base26 (A-Z). Similar concept to Base36. Understand the pattern for programmatic column handling.

Creating human-readable hashes

Hash values in Base36 are shorter than hex. SHA-256 becomes 52 chars instead of 64. Easier to compare and communicate.

What to Know Before Using

Case is typically ignored.Base36 is case-insensitive. ABC and abc represent the same value. Most implementations use uppercase for output, accept either for input.

No special characters needed.Base36 uses only 0-9 and A-Z. No +, /, or = like Base64. Completely URL-safe without encoding. Safe for filenames too.

Compression ratio varies.Base36 is ~21% more compact than decimal. Less compact than Base64 but more readable. Good balance of size and usability.

Leading zeros are optional.Like decimal, leading zeros don't change value. 007 and 7 are identical. Output typically omits leading zeros.

Pro tip: For URL shorteners, combine Base36 with a custom alphabet. Shuffle the character order for additional obfuscation. Makes IDs harder to guess sequentially.

Common Questions

What characters are in Base36?

Digits 0-9 (values 0-9) and letters A-Z (values 10-35). Total 36 characters. Case-insensitive: A and a both equal 10.

How does Base36 compare to Base64?

Base36 is less compact but more readable. Base64 uses + and / which need URL encoding. Base36 is always URL-safe. Choose based on needs.

Can I encode text directly?

Base36 encodes numbers. For text, first convert to bytes, then to a number, then to Base36. Or encode each character separately.

What's the maximum value?

No theoretical limit. Limited only by your system's integer size. This tool handles arbitrarily large numbers using big integer arithmetic.

How do I validate Base36 input?

Check that all characters are 0-9 or A-Z (case-insensitive). Any other character is invalid. Reject or strip invalid characters.

Is Base36 reversible?

Yes, perfectly. Encoding then decoding returns the original number. No information is lost. It's a lossless base conversion.

Why use Base36 over hex?

Base36 is ~25% more compact than hex. More human-readable. Still URL-safe. Good middle ground between decimal and Base64.