UUID Online Generator

Bulk Generation

What is a UUID?

A universally unique identifier (UUID) is a 128-bit number used to identify information in computer systems. The term globally unique identifier (GUID) is also used.

When generated according to the standard methods, UUIDs are for practical purposes unique, without depending for their uniqueness on a central registration authority or coordination between the parties generating them, unlike most other numbering schemes. While the probability that a UUID will be duplicated is not zero, it is close enough to zero to be negligible.

Thus, anyone can create a UUID and use it to identify something with near certainty that the identifier does not duplicate one that has already been, or will be, created to identify something else. Information labeled with UUIDs by independent parties can therefore be later combined into a single database, or transmitted on the same channel, with a negligible probability of duplication.

Adoption of UUIDs and GUIDs is widespread, with many computing platforms providing support for generating them, and for parsing their textual representation.

Read more at Wikipédia

About UUID Online.net

UUID Online.net is a very powerful and simple JavaScript UUID Generator.

You know what is UUID?

A UUID (Universal Unique Identifier) is a 128-bit value used to uniquely identify an object or entity on the internet. Depending on the specific mechanisms used, a UUID is either guaranteed to be different or is, at least, extremely likely to be different from any other UUID generated until A.D. 3400.

UUIDs can be generated to refer to almost anything imaginable. For example, they can identify databases, system instances, primary keys, Bluetooth profiles or objects with short lifetimes.

UUID is a term analogous to GUID. Originally, GUID referred to a variant of UUID used by Microsoft, but the terms became synonymous in the RFC 4122 specification. UUID was standardized by the Open Software Foundation (OSF), becoming a part of the Distributed Computing Environment (DCE). Different versions of UUID follow the RFC 4122 specification.

UUIDs are generated using an algorithm based on a timestamp and other factors such as the network address.

How does UUID work?

The UUID relies on a combination of components to ensure uniqueness. UUIDs are constructed in a sequence of digits equal to 128 bits. The ID is in hexadecimal digits, meaning it uses the numbers 0 through 9 and letters A through F. The hexadecimal digits are grouped as 32 hexadecimal characters with four hyphens: XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX. The number of characters per hyphen is 8-4-4-4-12. The last section of four, or the N position, indicates the format and encoding in either one to three bits.

As an example, UUIDs based around time have segments that are divided by hyphens that signify low, mid and mid time and version as different timestamps used to identify the UID. The digits under the last section, the node, denote the MAC address.

Variants of UUID

There are three variants of UUID:

  • Variant 0: This variant is reserved for backward compatibility with the obsolete Apollo Network Computing System from the late 1980s. It has a similar construction to the version 1 UUIDs used today.
  • Variant 1: Variant 1 is the main variant used today. These variants are referred to as RFC 4122/DCE 1.1 UUIDs, or Leach-Salz UUIDs after the authors of the Internet Engineering Task Force working document defining UUID specifications. As an example, GUIDs are variant 1 UUIDs.
  • Variant 2: Variant 2 is reserved for Microsoft backward compatibility. Even though many of the GUIDs Microsoft uses are variant 1 UUIDs, early GUIDs on the Windows platform used variant 2. The difference between variants 1 and 2 is the number of bits in the N position. Variant 1 UUIDs use two bits, while variant 2 UUIDs use three bits.

UUID versions

The current variant of UUID, variant 1, consists of five different versions. These versions differ in how they are constructed. Types of UUIDs include:

  • Version 1:This version is generated from a specified time and node It is a time stamp-based unique host identifier.
  • Version 2:This version is generated similarly to version 1, however, less significant bits are replaced. Namely, eight bits of the clock sequence are replaced by a local domain number and 32 bits of the timestamp are replaced with the number for the specified local domain. These are reserved for DCE Security UUIDs.
  • Version 3:This version is generated by hashing both a namespace identifier and a name. Versions 3 and 5 are constructed similarly; however, version 3 uses message-digest algorithm 5 (MD5) as the hashing algorithm.
  • Version 4:This version of UUID is generated randomly. Although the random UUID uses random bytes, four bits are used to indicate version 4, while two to three bits are used to indicate the variant. These can be created using a random or pseudo-random number generator. More bits are used in this version, so there are fewer UUID combinations. However, there are still enough UUID combinations to avoid the possibility of a collision.
  • Version 5:Version 5 is generated the same way as version 3. However, it is generated using Secure Hash Algorithm 1, or SHA-1, as opposed to MD5, which version 3 uses for hashing. Versions 3 and 5 are well suited for use as unique identifiers for information and data within a namespace of a system.

An extra version of UUID, and a special case, is the Nil UUID. This UUID contains all zeros for integers.

UUID collisions

A collision is when the same UUID is generated more than one time and is assigned to different objects. Even though it is possible, the 128-bit value is extremely unlikely to be repeated by any other UUID. The possibility is close enough to zero, for all practical purposes, that it is negligible. Even in version 4 UUIDs, where there are fewer UUID combinations, the chance of a collision is low enough to be ignored.

How to generate UUID in JavaScript or TypeScript?

Install uuid Package "npm install uuid"

import { v4 as uuidv4 } from 'uuid';

const myUuid = uuidv4();
console.log('Your UUID is: ' + myUuid);

How to generate UUID in Golang?

Install the go.uuid Package "go get github.com/satori/go.uuid"

package main

import (

func main() {
	myuuid, err := uuid.NewV4()
	fmt.Println("Your UUID is: %s", myuuid)

How to generate UUID in PHP?

Simple function, requires PHP 7 or higher:

function guidv4($data = null) {
	// Generate 16 bytes (128 bits) of random data or use the data passed into the function.
	$data = $data ?? random_bytes(16);
	assert(strlen($data) == 16);

	// Set version to 0100
	$data[6] = chr(ord($data[6]) & 0x0f | 0x40);
	// Set bits 6-7 to 10
	$data[8] = chr(ord($data[8]) & 0x3f | 0x80);

	// Output the 36 character UUID.
	return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4));

$myuuid = guidv4();
echo $myuuid;

Install ramsey/uuid PHP Library "composer require ramsey/uuid"

use Ramsey/Uuid/Uuid;

$myuuid = Uuid::uuid4();
printf("Your UUID is: %s", $myuuid->toString());

How to generate UUID in Python?

The Python language has built-in support for generating Version 1, 3, 4 and 5 UUIDs. Check:

import uuid

myUuid = uuid.uuid4()
print('Your UUID is: ' + str(myUuid))

How to generate UUID in C#?

The C# language, via the .NET Framework, has built-in support for generating Version 4 UUIDs. Check:

using System;
using System.Diagnostics;

namespace SampleApplication {
	class Program {
		static void Main(string[] args) {
			Guid myuuid = Guid.NewGuid();
			string myuuidAsString = myuuid.ToString();

			Debug.WriteLine("Your UUID is: " + myuuidAsString);

How to generate UUID in VB.Net?

The VB.NET language, via the .NET Framework, has built-in support for generating Version 4 UUIDs. Check:

Imports System.Diagnostics

Module Module1
	Sub Main()
		Dim myuuid As Guid = Guid.NewGuid()
		Dim myuuidAsString As String = myuuid.ToString()

		Debug.WriteLine("Your UUID is: " & myuuidAsString)
	End Sub
End Module


UUID Online.net is free and Maintained by BCJ IT Solutions . Created by Eduardo , Felipe , Fernando and Herbert .