left-arrow-icon
uuid-generator icon

UUID Generator

GUID generator - Generate UUID online for types uuid v4, uuid v3, uuid v1 and uuid v5. This can be used for Unique ID generation as a sample

Home

Developer Tools

UUID Generator


uuid v4 Generator

copy icon     refresh icon  

Unique ID Generation and UUID Types

Additional Information icon
  • A UUID generator (Universally Unique Identifier) is a tool that can be used to generate universally unique identifiers (UUIDs).

  • UUIDs are 128-bit values that are guaranteed to be unique across space and time. This makes them ideal for use in a variety of applications, such as database identifiers, file names, and session tokens.
  • There are different versions of UUID generators, including v1, v2, v3, and v4.
  • Here's some information about each of these versions:

  • UUID v1 or UUID1: Version 1 UUIDs

    are generated based on the current timestamp and the MAC address of the network interface card (NIC) on the generating machine.
    This version includes the potential risk of revealing the MAC address, which can compromise privacy. However, it provides a guaranteed uniqueness within a specific network.
  • UUID v2 or UUID 2: Version 2 UUIDs

    were defined in the past but are not widely used. They are similar to v1 UUIDs but include additional information, such as the local domain and an identifier representing the local instance. Due to limited adoption, v2 UUIDs are not commonly used.
  • UUID v3 or UUID 3: Version 3 UUIDs

    are generated using a hashing algorithm, such as MD5 or SHA-1, along with a namespace and a name.
    The resulting UUID is deterministic, meaning that the same inputs will always produce the same UUID. This version is useful when a consistent identifier is needed for a given namespace and name combination.
  • UUID v4 UUID 4: Version 4 UUIDs

    are generated using a random or pseudo-random number generator. They do not include any meaningful information or guarantee uniqueness based on the generating machine's MAC address. Instead, v4 UUIDs rely on the randomness of the generator to provide a low probability of collisions. This is the most commonly used version of UUIDs today.
  • UUID v5 or UUID 5: Version 5 UUIDS

    are generated from a namespace UUID and a name. It is a deterministic UUID, meaning that the same name and namespace will always generate the same UUID.

    UUID v5 is generated using the SHA-1 cryptographic hash function. The namespace UUID is a fixed UUID that is used to identify the type of data that the UUID is being generated for. The name is a string of arbitrary length that uniquely identifies the data within the namespace.

    UUID v5 is often used in situations where it is necessary to generate a unique identifier for a piece of data that is not random. For example, it can be used to generate a UUID for a file, a database record, or a user account.
  • Note: This content has inputs from both the AI language model developed by OpenAI and by Bard, the Google AI model.

Key points about UUID generators

Additional Information icon
  • UUIDs are 128-bit values

    , typically represented as a string of 32 hexadecimal characters separated by hyphens.
  • Open Software Foundation (OSF) which is part of the Distributed Computing Environment (DCE) has standardized UUIDs.
  • There are

    16 octets of a UUID

    which are represented as 32 hexadecimal (base-16) digits.
  • It is displayed in five groups separated by hyphen(-), in the form 8-4-4-4-12 which make up a total of 36 characters.
  • There are currently 5 versions of UUID of which v4 is widely followed.
  • UUIDs are designed to be globally unique, meaning that the probability of generating the same UUID by different sources is extremely low.
  • The choice of UUID version depends on the specific requirements of the application. For most general use cases,

    UUID v4 is recommended due to its simplicity and randomness.

  • It's important to note that while UUIDs provide uniqueness, they are not designed to be sequential or sortable. If sequential ordering is required, additional measures need to be taken, such as combining a timestamp with the UUID or using a different identifier scheme.
  • Here are some examples of how UUIDs can be used:
    • Database identifiers: UUIDs can be used as unique identifiers for records in a database. This makes it easy to find and manage records, even if they are moved between different databases.
    • File names: UUIDs can be used as file names to ensure that each file is unique. This can be useful for preventing file conflicts and for organizing files in a consistent way.
    • Session tokens: UUIDs can be used as session tokens to authenticate users and track their activity on a website or app. This helps to ensure that only authorized users can access certain features and that their data is protected.

Note: This content has inputs from both the AI language model developed by OpenAI and by Bard, the Google AI model.

GUID / UUID Example Table

Type / Version

Description

Namespace

Name (any value)

UUID example

Notes

v1 (Type 1 / Version 1)

Timestamp + Mac Address

Not applicable

Not applicable

89a10a20-cbbe-11ec-a676-bb300328973c

Identifiable pattern based on mac address

v2 (Type 2 / Version 2)

Timestamp + User id / group id + Mac address

Not applicable

Not applicable

ac543fb0-a12c-11ec-a676-bb300328973c

DCE Security UUIDs similar to v1 with additional user id / group id (Mac + date-time + user id/group id)

v3 (Type 3 / Version 3)

ns:DNS(predefined)

6ba7b810-9dad-11d1-80b4-00c04fd430c8

mybrowserappstore

c87ee674-4ddc-3efe-a74e-dfe25da5d7b3

namespace base uuid + unique name and MD-5 hash

v3 (Type 3 / Version 3)

ns:URL(predefined)

6ba7b811-9dad-11d1-80b4-00c04fd430c8

https://mybrowserappstore.com

14cdb9b4-de01-3faa-aff5-65bc2f771745

v3 (Type 3 / Version 3)

ns:OID(predefined)

6ba7b812-9dad-11d1-80b4-00c04fd430c8

oid:123

91bc86a1-765c-310d-829e-7522b0d85e1d

v3 (Type 3 / Version 3)

ns:X500(predefined)

6ba7b814-9dad-11d1-80b4-00c04fd430c8

x500:1

5c649c9a-f28f-3b89-9166-9c1b707d513e

v3 (Type 3 / Version 3)

Custom (any namespace and name)

12300000-1111-2222-abcd-000000654321

Test

a3da4409-9642-3e95-b86c-c2f54c2eb4eb

v4 (type 4 / version 4)

random unique number

Not applicable

Not applicable

f3c1b998-081a-41d7-9f6e-c0ebe9b94652

Unique and completely random. Most widely used version

v5 (Type 5 / Version 5)

ns:DNS(predefined)

6ba7b810-9dad-11d1-80b4-00c04fd430c8

mybrowserappstore

6cb8e707-0fc5-5f55-88d4-d4fed43e64a8

namespace base uuid + unique name and SHA-1 hash

v5 (Type 5 / Version 5)

ns:URL(predefined)

6ba7b811-9dad-11d1-80b4-00c04fd430c8

https://mybrowserappstore.com

1b4db7eb-4057-5ddf-91e0-36dec72071f5

v5 (Type 5 / Version 5)

ns:OID(predefined)

6ba7b812-9dad-11d1-80b4-00c04fd430c8

oid:123

695da010-7dba-5010-8eb0-885b11807d1b

v5 (Type 5 / Version 5)

ns:X500(predefined)

6ba7b814-9dad-11d1-80b4-00c04fd430c8

x500:1

411e336b-f885-5e78-9c9a-5df247a470d1

v5 (Type 5 / Version 5)

Custom (any namespace and name)

12300000-1111-2222-abcd-000000654321

Test

7ba46758-7471-5c2b-83c3-84826c92c359

Frequently Asked Questions on UUID Generator

FAQ icon

  • UUID stands for Universally Unique Identifier. They are also called GUID (Globally Unique Identifier). The UUID is 128 bits indicated using 32 hexadecimal digits and in 4 parts separated by hyphen (-). Example of a unique id (uuid) is 99506172-4ff6-4f5b-a6c5-a1543ee729f3

  • There are 5 versions of UUID - v1, v2, v3, v4 and v5 v1 UUID generates based on timestamp and MAC address of the system where it's generated. 505cd900-dbch-12db-b10f6-a3a17984572 . 813214b0-dbch-12db-b10f6-a3a17984572 . Note: the 2nd part shows it's from Same machine (dbch-12db-b10f6-a3a17984572). v2 UUIDs are DCE Security UUIDs and not much information is except it's similar to version-1 with some additional userid/group id based randomness(Mac + date-time + user id/group id) and based on User id / group id. v3 UUID - It generates the UUID using MD5 hash of the inputs (namespace and name as input by user) v4 UUID - it generates a completely random number eg: 91de133a-df92-4a5c-996e-94f729e87010 . v5 UUID - It generates the UUID using SHA hash of the inputs (namespace and name as input by user). If same input is given, it returns the same output.

  • v4 is the standard format. It generates secure and completely random numbers. v1 generates based on Mac address. So if you want to recognize patterns from trusted sources, then v1 can be used. If we need same reproducible UUIDs given an name and namespace, then v3 or v5 can be used which provide the UUIDs by using hashing from given name and namespace. If name and namespace are same the hash will be same. v3 uses MD5 and V5 uses SHA-1

  • UUID is useful wherever we need to uniquely identify objects or resources universally like product, book, person or any entity in backend / storage systems can use UUID. Any order, purchase transactions use UUID to uniquely identify the transaction have unique identifiers.

  • v3 and v5 generate UUID of repeatable and consistent formats. IF the namespace and name is same, the output is same. For repeatability and consistency, these uuid types are used. Namespace is a base / seed input which has to be in UUID format. THis UUID is used as base to generate. Name is any unique digit or string input.

  • DNS — 6ba7b810-9dad-11d1-80b4-00c04fd430c8 OID — 6ba7b812-9dad-11d1-80b4-00c04fd430c8 URL — 6ba7b811-9dad-11d1-80b4-00c04fd430c8 X.500 DN — 6ba7b814-9dad-11d1-80b4-00c04fd430c8

  • No, but versons 3 and 5 generate UUID based on MD5 / SHA1 which hash the input of name and namespace. The UUID from v3 and v5 format is similar as it uses hashing algorithm of MD5 and SHA1 respectively

  • 32 digits

  • 128 bits, 16 bytes in big endian order

  • No, they are not case sensitive.

  • In v4, which uses random UUID generator, there is a theoretical chance of collision but probability of actual occurrence is almost nil

  • Yes, both refer to the same thing - Universally / Globally Unique identifiers. GUID is coined by Microsoft. UUID is from the Open Software Foundation (OSF).