UUID Format
Short UUID Format
Base64url-encoding the same 16 random bytes turns a 36-character UUID into a 22-character string with identical entropy.
22 charactersbase64url safe128-bit entropy
Generated locally with the Web Crypto API — nothing leaves your browser.
What Is Short UUID Format?
- A short ID takes the same 16 random bytes as a v4 UUID and encodes them with base64url, which uses 64 URL-safe symbols instead of 16 hex digits.
- The result is 22 characters long instead of 36, with no padding and no characters that need escaping in a URL.
How to generate
- Generate — the engine produces 22-character base64url IDs.
- Copy one, or generate a batch for several records.
- Paste directly into URLs, short links or redemption codes.
Use Cases
- Short links where the visible length matters to users.
- Affiliate or coupon codes that people may type by hand.
- Compact tokens in storage with tight constraints.
How Short UUID Format Compares
| Short (22) | base64url of 16 bytes — compact and URL-safe |
| UUID v4 (36) | hex in 8-4-4-4-12 — standard and human-readable |
| NanoID | Custom alphabet, similar length, different scheme |
Code Examples
JavaScript
const b = crypto.getRandomValues(new Uint8Array(16));
const id = btoa(String.fromCharCode(...b))
.replace(/\+/g, '-').replace(/\//g, '_').replace(/=+$/, '');Python
import base64, os
id = base64.urlsafe_b64encode(os.urandom(16)).decode().rstrip('=')Frequently Asked Questions
Is a short ID as unique as a UUID?
Yes — identical 128-bit entropy. Only the encoding differs, so collision odds are the same.
Why exactly 22 characters?
16 bytes is 128 bits and base64 carries 6 bits per character: 128 ÷ 6 ≈ 21.33, rounded up to 22.
Can I convert a short ID back to a UUID?
Yes — base64url-decode it to 16 bytes, then format those bytes as 8-4-4-4-12.
Related tools
UUID v1 GeneratorUUID v3 GeneratorUUID v4 GeneratorUUID v5 GeneratorUUID v6 GeneratorUUID v7 GeneratorUUID v8 GeneratorBulk UUID GeneratorShort UUID GeneratorUUID ValidatorUUID FormatterUppercase UUID GeneratorLowercase UUID GeneratorUUID Without HyphensUUID With HyphensUUID With BracesShort UUID Format