Vanity GUIDs for Fun Maybe Profit

Here’s a GUID generator that delivers them in a configurable alphabet instead of the more familiar format e.g. 3F2504E0-4F89-41D3-9A0C-0305E82C3301. Basically a port of shortuuid in python by Stochastic Technologies.

It is possible to have too much fun generating GUIDs for your next project… Just make sure your custom alphabet has unique characters and no one will get hurt.

  // default alphabet
  var guid = new ShortUUID();
  Console.WriteLine(guid.Uuid());

  // waves
  guid = new ShortUUID(@"/_-\");
  Console.WriteLine(guid.Uuid());

  // morse
  guid = new ShortUUID(@". ");
  Console.WriteLine(guid.Uuid());

  // ascii symbols
  guid = new ShortUUID("!@#$%^&*()-[];:'\",.<>?/\\~`|+=");
  Console.WriteLine(guid.Uuid());  

And here’s the gist:

Leave a Reply