Short UUID Generator

Generate compact 22-character Base58-encoded UUIDs for URL-friendly usage

Try these examples:

What is Short UUID?

Short UUID is a technique to compress standard 128-bit UUIDs into shorter, URL-friendly strings. It typically involves:

  • Base conversion: Converting the UUID from base-16 (hex) to a higher base (usually base-58 or base-62)
  • Character set selection: Using URL-safe character sets with no ambiguous characters
  • Lossless compression: Preserving all information from the original UUID

Example transformation:

  • Standard UUID: f47ac10b-58cc-4372-a567-0e02b2c3d479
  • Short UUID (base-58): 2kLrTdCQVWFjc7dYXzzB5A

How Short UUID works

  1. Remove hyphens from the standard UUID
  2. Convert the resulting 32-character hex string to a decimal number
  3. Convert the decimal number to a higher base (58, 62, 64, etc.)
  4. Pad the result if necessary to ensure consistent length

Common encoding alphabets include:

  • Base-58: Alphanumeric without ambiguous characters (0, O, I, l)
  • Base-62: All alphanumeric characters (a-z, A-Z, 0-9)
  • Base-64: Alphanumeric plus two special characters (often + and /)

Advantages & Considerations

AdvantagesConsiderations
  • URL-friendly format
  • Character length savings (40-50%)
  • Improved user experience
  • Full bidirectional conversion
  • Base conversion overhead
  • Implementation complexity
  • Database storage consideration
  • Non-standard format

Length Comparison

FormatLengthCharacter SetExample
Standard UUID36 charsHex + hyphensf47ac10b-58cc-4372-a567-0e02b2c3d479
Hex (no hyphens)32 chars0-9, a-ff47ac10b58cc4372a5670e02b2c3d479
Base-5822 charsNo 0, O, I, l2kLrTdCQVWFjc7dYXzzB5A
Base-62~22 charsAlphanumeric3pqLYdcw9TGKxNVgeO0gOd
Base-64~22 charsAlphanumeric + symbols9HrBC1jMQ3KlZw4CssPUeQ==

Common Base-58 Alphabet

The Base-58 alphabet is designed to be visually unambiguous when displayed in both fixed-width and proportional fonts:

Character setContent
Numbers1-9 (excluding 0)
Uppercase lettersA-Z (excluding I, O)
Lowercase lettersa-z (excluding l)

Characters: 123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz

Common Use Cases

  • URL shortening: More compact URL parameters
  • Public-facing IDs: User or content identifiers
  • QR code optimization: Fewer characters = simpler codes
  • Mobile applications: Less data transmission
  • API design: Cleaner, more compact resource identifiers
  • Social sharing: More user-friendly links

Frequently Asked Questions

Are Short UUIDs as unique as standard UUIDs?

Yes. Short UUIDs are just a different representation of the same 128-bit value. The conversion is lossless, preserving all the uniqueness properties of standard UUIDs.

Can I convert between standard and Short UUID formats?

Yes. The conversion is bidirectional - you can encode a standard UUID to Short UUID and decode it back to exactly the same standard UUID.

Which base encoding is most recommended?

Base-58 is often preferred because it avoids ambiguous characters (0/O and l/I) while staying URL-safe without requiring URL encoding.

How much shorter are Short UUIDs?

Standard UUIDs are 36 characters (with hyphens). Short UUIDs are typically 22 characters when using base-58/62/64 encoding, a reduction of about 40%.

Should I store Short UUIDs in my database?

It's generally recommended to store the standard UUID format in databases and convert to Short UUID only when displaying to users or in URLs. This provides better compatibility with database UUID types.

Resources