Back to tools

UUID Generator

Generate random UUIDs/GUIDs

Generated UUIDs 0 UUIDs

What is a UUID/GUID?

UUID (Universally Unique Identifier) or GUID (Globally Unique Identifier) is a 128-bit identifier that is unique across both space and time. They are commonly used in software development for:

  • Database primary keys
  • Distributed systems communication
  • Session identifiers
  • Unique resource identifiers

UUID Versions

Version 4 (Random): Generated using random numbers. This is the most common version and is suitable for most applications where uniqueness is required.

Version 1 (Time-based): Generated using the current timestamp and MAC address of the computer. This version can potentially expose information about when and where the UUID was created.

Code Examples

Generate UUID in JavaScript:

// Using the crypto API
const uuid = crypto.randomUUID();

// Or using a library like uuid
import { v4 as uuidv4 } from 'uuid';
const uuid = uuidv4();

Generate UUID in Python:

import uuid

# Version 4 (random)
random_uuid = uuid.uuid4()

# Version 1 (time-based)
time_based_uuid = uuid.uuid1()
Notification message