Base62 Encoder + Decoder (URL Shorteners)
Base62 uses digits + lowercase + uppercase = 62 characters. URL shorteners (bit.ly, YouTube video IDs) use it to produce compact, URL-safe IDs. This tool encodes integers to base62 and decodes them back.
How to use the Base62 Encoder + Decoder (URL Shorteners)
Pick a direction. Encoding: enter a positive integer (BigInt supported). Decoding: enter a base62 string.
Base62 for compact numeric IDs
Base62 represents a number using 62 symbols: the digits 0–9, lower-case a–z, and upper-case A–Z. Because it is purely alphanumeric, the output drops cleanly into URLs, filenames, and hostnames with no escaping. URL shorteners like Bitly and the eleven-character IDs in YouTube links use exactly this idea to turn a database row number into a short, opaque code.
This converter works on integers — give it a positive number and it returns the base62 string, or paste a base62 string to read the number back. It handles very large values via BigInt, so an ID well beyond 64 bits still converts exactly. If you specifically want to shorten 128-bit UUIDs, the UUID to Base62 tool is purpose-built for that.
Common use cases
- Building a URL shortener — map an auto-incrementing ID to a short base62 slug.
- Opaque public IDs — expose a compact code instead of a raw sequential database key.
- Decoding short links — recover the numeric ID a base62 code stands for.
- Shorter references — turn a large counter into a few alphanumeric characters.
- Learning positional bases — see how a number looks when written in base 62.