Developer Playground

UUID Generator

A UUID (Universally Unique Identifier) is used to generate a unique identifier. Each version has a different generation method and purpose.


UUID v4 (Random-based)

Completely randomly generated and widely used. The possibility of collision is extremely low.

Result:Click the button to generate a UUID v4

UUID v7 (Sortable by Time)

Generated by combining a Unix timestamp with a random value. It is sortable by time and advantageous for database indexing.

Result:Click the button to generate a UUID v7

UUID v1 (Time-based)

Generated based on the current time and MAC address. It is unique but may expose time information.

Result:Click the button to generate a UUID v1

UUID v5 (Name-based, SHA-1)

Generated by converting a namespace and name string into an SHA-1 hash. It is more secure than v3.

Result:Enter namespace and name, then click the button

UUID v3 (Name-based, MD5)

Generated by converting a namespace and name string into an MD5 hash. Less secure than v5 but faster.

Result:Enter namespace and name, then click the button

What is a UUID?

A UUID (Universally Unique Identifier) is a 128-bit number used to identify information in computer systems. When generated according to standard methods, UUIDs are for practical purposes unique, without depending on a central registration authority. They are widely used as database primary keys and transaction IDs.

Which version should I use?

UUID v4 is completely random and is the most common choice for general purposes. UUID v7 is highly recommended for database keys because it includes a time-based component, meaning new IDs are sequentially sorted, preventing database fragmentation. UUID v1 is time-based but exposes the MAC address of the generator. UUID v3 and v5 are deterministic, meaning the same input (namespace + name) will always produce the same UUID.