Base36 Encoder & Decoder
Encode text or a large integer to Base36 — the digits 0-9 plus the letters a-z — and decode Base36 back to text or a number. Base36 is the most compact encoding that stays case-insensitive and URL-safe, which makes it popular for short identifiers, timestamps, and invoice numbers. The conversion is big-integer accurate and runs entirely in your browser.
How to use the Base36 Encoder & Decoder
Choose a mode and a direction. In Number mode, encoding turns a decimal integer into Base36 and decoding turns a Base36 string back into a decimal integer — so 1234567890 becomes kf12oi. In Text mode, encoding treats your text as UTF-8 bytes, reads them as one big number, and writes that in Base36; decoding reverses the process to recover the original text.
Base36 is case-insensitive, so when decoding you may type the letters in upper or lower case and the result is the same; the encoder emits lower case by convention. Because JavaScript numbers cannot represent large integers exactly, the tool uses big-integer arithmetic, so even very long numbers and strings convert without rounding. The result card includes a copy button.
It all runs in your browser, so conversions are instant, work offline, and nothing you enter is uploaded anywhere.
What Base36 is and where it fits
Base36 is a positional numeral system that uses thirty-six symbols: the ten digits 0-9 and the twenty-six letters a-z. It is the largest base you can build using only the characters that survive being case-folded, which is the property that makes it so practical. Because A and a map to the same value, a Base36 string can be typed in any case, spoken aloud, written on a form, or embedded in a case-insensitive URL or filename without ambiguity — something Base62 and Base64 cannot promise, since they depend on the distinction between upper and lower case.
That robustness is why Base36 shows up wherever a number needs to be made short and human-friendly. It compresses a long decimal into roughly 60% of its digit count: a millisecond timestamp that is thirteen decimal digits fits in eight Base36 characters, which is why systems that generate sortable IDs often render the time component in Base36. Invoice numbers, coupon codes, short URLs, and database primary keys exposed in links all use it for the same reason — fewer characters, no case confusion, and an alphabet that needs no special encoding in any context. JavaScript even has it built in: Number.prototype.toString(36) and parseInt(s, 36) handle small values directly, though they lose precision once the number exceeds what a double can hold, which is exactly the gap a big-integer converter fills.
Encoding a number is the textbook algorithm: repeatedly divide by 36 and record the remainders, which become the digits from least to most significant. Encoding text takes one extra conceptual step — the bytes of the string are interpreted as a single large integer (the first byte most significant), and that integer is written in Base36; decoding reverses both stages. One consequence worth knowing is that, like other big-number text encodings, leading zero bytes are not preserved through a round trip, because a number has no concept of a leading zero. For the usual job of shortening an identifier or a counter, that never matters, and Base36 gives you a compact, case-proof, copy-paste-safe representation that works the same in every language and every URL.
Common use cases
- Short IDs. Render a numeric primary key or counter as a compact, case-insensitive code.
- Timestamps. Pack a millisecond epoch time into a few sortable Base36 characters.
- Coupon and invoice codes. Produce codes that are safe to read aloud or type in any case.
- Decoding values. Turn a Base36 string from a log or URL back into its decimal number or text.