Skip to content
ZeroServer.tools

Short UUID Generator

Generate short, URL-safe 22-character base62 IDs that are collision-resistant — a compact alternative to standard UUIDs.

Each ID is 22 characters, base62 encoded (0–9A–Za–z), generated using crypto.getRandomValues().

About Short UUID Generator

Standard UUIDs are 36 characters (including hyphens). This tool encodes 128 bits of randomness as base62 (0–9A–Za–z), producing a 22-character string that is URL-safe and contains no special characters. IDs are generated using the browser's crypto.getRandomValues() API for cryptographically secure randomness, making collision probability negligible for virtually any application.

Built and maintained by Meet Shah · Last updated

What this tool is used for

  • Producing a compact identifier for a URL where a full UUID with its dashes is unwieldy.
  • Generating a slug for a shared resource that must be unguessable but also copyable by hand.
  • Shortening an existing UUID for display while keeping the underlying value recoverable.
  • Creating identifiers for a QR code where every character costs pixels.
  • Producing filenames that are unique, sortable by nothing, and safe on every filesystem.

Frequently Asked Questions

How is a short UUID shorter?
It re-encodes the same 128 bits in a larger alphabet. Base58 or Base62 turns a 36-character UUID into about 22 characters with NO loss of entropy — the value is identical, only the notation changes.
Is any randomness lost?
None. Encoding is lossless and fully reversible back to the canonical UUID. This is quite different from truncating a UUID, which discards bits and sharply raises collision probability.
Why not just truncate instead?
Because collisions scale by the birthday bound: cutting a UUID to 8 characters leaves ~48 bits, where a collision becomes likely after a few million values. Re-encoding keeps all 122 random bits and costs nothing.
Which alphabet should I choose?
Base58 if humans will read or retype the value, since it drops 0, O, I and l. Base62 is slightly shorter and fine for machine use. Base64URL is shortest but its - and _ can look like separators.
Are these sortable by time?
No — UUIDv4 is pure randomness, so short UUIDs scatter randomly and fragment database indexes. For time-ordered short IDs use ULID or UUIDv7, which put a timestamp in the leading bits.
Are short IDs safe in URLs and filenames?
Depends on the alphabet. Base58 deliberately omits `0`, `O`, `I` and `l` and needs no escaping. Base64url is URL-safe but case-sensitive, which breaks on case-insensitive filesystems — two distinct IDs can collide as filenames.
Do short IDs collide sooner than full UUIDs?
Only if entropy was discarded. A re-encoding of the same 122 random bits has identical collision odds — it is shorter because base58 packs more per character, not because it holds less. Truncating, by contrast, really does raise the risk.

Common errors and gotchas

  • Confusing shortening with truncating. Re-encoding keeps all 122 random bits; cutting characters throws them away.
  • Expecting time ordering. A version 4 UUID is random, so short forms of it sort arbitrarily.
  • Mixing alphabets between systems, after which the same underlying value decodes to a different string.
  • Assuming the shorter string is easier to say aloud. Base62 is case-sensitive, which makes dictation worse, not better.
  • Treating an unguessable identifier as an access control. It is a secret in a URL, and URLs leak into logs and referrers.

Related Generators tools

Private & free — this tool runs entirely in your browser.

CloudwaysManaged cloud hosting on AWS, GCP & DO — from $11/mo.affiliate