Here is the new Global Unique Identifier (GUID) generated for you:

{73f72a2c-e028-49ff-9553-4198d74e37a6}

This page provides a function to generate a new Global Unique Identifier (GUID). It generates a GUID similar to what is generated by uuidgen.exe provided by Microsoft. However, even the results between uuidgen.exe and my implementation looks the same and even my code is based on a function provided by the Microsoft .NET 2.0 framework, I cannot guarantee that my code produces identical results.

A new GUID will be generated and displayed on top of this page each time the page is opened or the button "Create a new GUID" is clicked.

Disclaimer:
The generated GUID is provided AS IS without warranty of any kind. The risk of using this GUID is entirely up to you. Don't use the created GUID if you don't agree to those terms. Never use a GUID from a cached page - it has been generated for someone else and might already be in use!


Frequently asked questions

Question: What is a GUID?

Answer: A GUID is a mathematically calculated identifier that is unique across both, space and time. There are many applications for GUIDs used in the software as well as in the telecommunications industries. Probably best known are GUIDs used in the Microsoft Windows Operating System where any kind of Software component is registered with a GUID. However, GUIDs are used in many other pieces of software as well. There are different implementations and algorithms to create different types of GUIDs (e.g. time/node or random number based). There is a standard called "Universally Unique Identifier" (UUID) specified in RFC 4122. The document is currently available from The Internet Engineering Task Force (ITF).

Question: How does a GUID look like?

Answer: Basically GUIDs are 128-bit numbers, normally represented as grouped hexadecimal string. Depending on its use a GUID can be represented in different formats. The format used on this page is the so called Windows Registry format.

In Registry format a GUID looks like this:
{2396b3a5-d948-9b4e-19db-232bc94425c1}

This slightly differs from the output generated by uuidgen.exe which is essentially the same but looks like this:
2396b3a5-d948-9b4e-19db-232bc94425c1

Question: What about Microsoft's GuidGen.exe?

Answer: Well, while both, my implementation and GuidGen.exe provides output in Registry format, GuidGen.exe provides three additional output formats for code creation. I have no intention to provide additional formats, since the code fragments, if needed, can easily be created with the output provided on this page.

Question: How do you generate the GUIDs? How did you implement it?

Answer: Im simply using the NewGuid() method from the System.Guid structure that comes with Microsoft .NET 2.0. Im creating a new instance of the class and convert this to a string for output. I'm using C# for doing this.

Here is the code from the button above to generate the GUID. It's basically to let interested parties to know how it works.

protected void Button1_Click(object sender, EventArgs e) { 
    guidLabel.Text = "{" + System.Guid.NewGuid().ToString() + "}"; 
}

Isn't that amazingly simple? Feel free to use this example in your own code.

Question: Are you sure the GUID created is always unique?

Answer: Since I'm using a third party implementation I don't know the algorithm used to create the GUID. In the documentation of NewGuid() Microsoft states: "This is a convenient static method that you can call to get a new Guid. There is a very low probability that the value of the new Guid is all zeroes or equal to any other Guid."

Question:  Are all GUIDs created the same way? Is it possible to create different types? 

Answer: The the UUID standard defines five algorithms to create different types of UUIDs. I don't know any details about Microsofts implementation in NewGuid() method. The versions in the standard are roughly defined as follows:

Version 1: is a time based version.
Version 2: is a DCE Security version with embedded POSIX UIDs.
Version 3: is a name based version that uses MD5 hashing.
Version 4: generates UUIDs from random numbers.
Version 5: is a name based version that uses SHA-1 hashing.

Since Microsofts .NET 2.0 NewGuid() implementation does not provide a parameter to generate a GUID based on a specific UUID the program used on this page does not provide an option to choose a specific version as well..


Related Links

RFC-4122, A Universally Unique IDentifier (UUID) URN Namespace, ITF
http://www.ietf.org/rfc/rfc4122.txt

Globally Unique Identifier, Wikipedia
http://en.wikipedia.org/wiki/GUID

Universally Unique Identifier, Wikipedia
http://en.wikipedia.org/wiki/GUID

UUID Generation and Registration as OID at Int'l Telecommunication Union (ITU)
http://www.itu.int/ITU-T/asn1/uuid.html

Authors Homepage
http://www.petergloor.com

Last modified: July 25, 2006