Globally Unique Identifier

A unique identifier that is guaranteed to be unique throughout the world.

In MicroSoft's ComponentObjectModel:

GUID = Globally Unique IDentifier

A 128-bit unique identifier used to uniquely identify interfaces, classes, and other InterfaceDefinitionLanguage entities.

Most commonly seen in the following format, which is known as the "Registry Format":


Properties / Advantages:

UUIDs/GUIDs predate MicroSoft - they were originally defined in the DistributedComputingEnvironment?'s RemoteProcedureCall (commonly known as DCE RPC) specification.

The DCE RPC specification is available at ; the detailed format and algorithms for generating UUIDs exist at

URLs, UniformResourceLocators such as the blue things above,, and are guaranteed to be unique. Doesn't an URL qualify then as a globally unique identifier?

Yes. They are used for precisely this purpose in the XML Namespaces recommendation from the W3C. In fact, DNS names can also be used as globally unique identifiers, and they are so used by Java's package naming conventions.

No, because DNS names are not controlled by a unique authority over time. That is why TagUris? ( include a date.

Yes but ... it's not always clear what an URL identifies, if it does not resolve to an human-readable resource expliciting what is the subject identified ... an issue well known with XML Namespaces, among others. That is currently worked out by OASIS TopicMaps Published Subjects Technical Committee.

{Our marketing department complains about the ugliness of URL's like:}

{I wonder if such bloats up databases also. Well-factored DB's often rely heavily on cross-references and may have roughly half of the columns be ID links (per data "cell" quantity, not schema counts).}

[GUIDs as used above rarely appear outside of current user session tracking, which is typically highly transient. Order-entry and related systems rarely retain GUIDs. There are various compression schemes that can be used to reduce the character count of GUIDs, too.]

What's the deal with WebSphere's gigantic URL's? (If the shortcut name is not used)

[I believe it's a compressed XML document.]

If that's the case, what if the layout changes but the URL is the same? If the "shape" of the page is also the ID (URL), then changing the shape would change the ID. Curious. It's roughly comparable to using an employee name as the ID instead of an employee number. If they get married/divorced and change their last name, the ID becomes "broken".

[It's not content, it's context information that's generated in one part of WebSphere and consumed in another. It's essentially an ID that's not meant to be disassembled. I believe the use of XML makes it less sensitive to change, such that WebSphere can add or remove context information in the "ID" or pass it across versions and still successfully process it.]

There's gotta be a better alternative. Why so much "context"?

[I don't know. I didn't create WebSphere.]

Well, pretend like you did so I can blame you, slap you, and then feel better. It's the American Way.

[You'll slap me and I'll like it. That's the British Way.]

Okay, as long as you don't wear the Tony Blair mask again.

[I'll wear my Maggie Thatcher mask instead.]

The distinction between the two, of course, is that any machine anywhere can run the published UUID algorithm at any time and obtain an identifier that is guaranteed to be unique across every machine everywhere at all times. This is the essence of their utility, and makes them well suited to identifying interfaces, serving as primary keys in distributed databases, etc.

The same cannot generally be said for a URL - an external coordination mechanism is required to ensure two parties don't claim the same URL. Thus the necessity of organizations like Network Solutions for domain names, or company standards so that com.mycompany.myproject doesn't put their code in the com.mycompany.yourproject package.

Actually UUIDs are only guaranteed to be unique because because an external authority has already handed out unique MAC addresses to each network card. If the algorithm is run at the same time on two machines without a MAC address there is a very small chance that they will generate identical UUIDs.

Uniform resource names (URNs) also serve this purpose. See also and

Dollar bills can also be used to generate unique identifiers. Take a dollar bill, record bill's number for use as the identifier and burn the bill before using the identifier. It will probably be cheaper to use Euros when they become available as physical currency! It's more expensive now. 2004-03-22

Don't tell anyone you're doing this. Destruction of currency is a crime in many countries! As if currency had something to do with the economy, or something...

Since they're fixed length, the date dependency must wrap around eventually. When will it be possible (that doesn't mean likely) for a machine with a MAC address to create an already assigned UUID?
See also: PassIdentifierAsString

View edit of March 23, 2013 or FindPage with title or text search