UUID Tool

Short UUID Generator

When a UUID is too long for a URL or a readable code, a 22-character base64url string keeps the same 128 bits of entropy in a tighter form.

22 chars (vs 36 for a UUID)URL-safe base64url128-bit entropy

Generated locally with the Web Crypto API — nothing leaves your browser.

What Is Short UUID Generator?

How to generate

  1. Press Generate to mint a 22-character ID.
  2. Use Copy to grab it, or generate several at once for a batch.
  3. Paste it directly into URLs, coupon codes, or short-link keys.

Use Cases

How Short UUID Generator Compares

Short UUID (22)base64url of 16 bytes; compact, URL-safe
UUID v4 (36)hex in 8-4-4-4-12; human-readable, standard
NanoIDCustom alphabet; similar compactness, different scheme

Code Examples

JavaScript
const b = crypto.getRandomValues(new Uint8Array(16));
const id = btoa(String.fromCharCode(...b)).replace(/\+/g,'-').replace(/\//g,'_').slice(0,22);
Python
import base64, os
id = base64.urlsafe_b64encode(os.urandom(16)).decode().rstrip('=')

Frequently Asked Questions

Is a short UUID less safe than a v4 UUID?
No. It is the same 128 random bits, just encoded differently. Collision probability is identical.
Why 22 characters?
16 bytes = 128 bits. base64 encodes 6 bits per character, so 128/6 ≈ 21.3 → 22 characters (the padding '=' is dropped).
Can I decode it back to a UUID?
Yes — base64url-decode the 22 characters and reformat the 16 bytes into the 8-4-4-4-12 shape.

Related tools