Skip to content
uencoder

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.

Purpose

It expresses large integers more compactly than decimal, in all-lowercase alphanumeric form, producing URL-friendly short codes.

Mechanism

A non-negative integer is repeatedly divided by 36; remainders 0-9 map to characters 0-9 and 10-35 map to a-z. Decoding expands by positional weight. It applies to integers only, not byte streams.

Use cases

  • Short-link generation (YouTube video IDs use a Base64 variant, but Base36 is simpler)
  • Compact database primary key representation
  • Invitation and redemption codes
  • Flickr short URLs

Examples

  • Input
    1234567890
    Output
    kf12oi

    Decimal to Base36

Common errors

Applying it to negative or floating-point numbers
Base36 is defined only for non-negative integers

Related terms

Related tools

References