dotnet-guid: Generate GUIDs/UUIDs with the Command Line

There have been a few projects, although not many, which I've been involved in, where generating GUIDs/UUIDs has been important. For that, I used to use online-tools like, but when I switched machine, the autocomplete in my browser lost that link.

Minimally for this reason, and mostly for fun, I decided to write a .NET Core Global Tool which quickly generates one or multiple GUIDs/UUIDs, in whatever format could be needed.


Download the .NET Core SDK 2.1 or later. The install the dotnet-guid .NET Global Tool, using the command-line:

dotnet tool install -g dotnet-guid


Usage: guid [arguments] [options]

  Count         Defines how may GUIDs/UUIDs to generate. Defaults to 1.

  -?|-h|--help  Show help information
  -n            Formatted as 32 digits:
  -d            Formatted as 32 digits separated by hyphens:
  -b            Formatted as 32 digits separated by hyphens, enclosed in braces:
  -p            Formatted as 32 digits separated by hyphens, enclosed in parentheses:
  -x            Formatted as four hexadecimal values enclosed in braces,
                where the fourth value is a subset of eight hexadecimal values that is also enclosed in braces:
  -e            Defines if the GUIDs/UUIDs should be empty, using zero-values only.
  -u            Defines if the GUIDs/UUIDs generated should be upper-cased letters.


To get a single GUID/UUID, simply type:


To get 3 random GUIDs/UUIDs, with letters in upper-case, formatted with brackets:

guid 3 -b -u

You can find the source-code on GitHub, the package on Nuget and the latest builds on MyGet.

You can find a great list of more .NET Core Global Tools on GitHub, maintained by Nate McMaster.