What is Sqids?

Sqids (pronounced "squids") is an open-source library that lets you generate YouTube-looking IDs from numbers. These IDs are short, can be generated from a custom alphabet and are guaranteed to be collision-free. Read more .

This is what they look like:


Why use them?

The main use of Sqids is purely visual. If you'd like to use IDs instead of numbers in your webapp, Sqids could be a good choice:

Use Cases

  • Link shortening Safe to use in URLs
  • Event IDs Fast collision-free ID generation
  • Quick lookups Decoding back into numbers

Not Good For

  • Sensitive data This is not an encryption library
  • User IDs Can be decoded, revealing user count


  • ๐Ÿ†” Generate short IDs from non-negative numbers
  • ๐Ÿงฐ Easy encoding & decoding
  • ๐Ÿคฌ Auto-generated IDs do not contain common profanity
  • ๐Ÿ”ค Support for custom IDs through shuffled alphabet
  • ๐ŸŽฒ Randomized IDs when encoding incremental numbers
  • ๐Ÿ‘ฉโ€๐Ÿ’ป 40 programming languages (10 using new design)
  • ๐Ÿ‘ฏโ€โ™€๏ธ Every version produces the same IDs
  • ๐Ÿป Small library with a permissive license

Example / Playground