Generated UUIDs
🐍 Python Usage
import uuid
id = uuid.UUID('')📦 Django Models
id = models.UUIDField(
default=uuid.uuid4,
editable=False
)🗄️ SQLAlchemy
Column(UUID(as_uuid=True),
primary_key=True,
default=uuid.uuid4
)Get UUID values and copy-paste Python code snippets for uuid4, uuid1, and namespace UUIDs — no setup required.
import uuid
id = uuid.UUID('')id = models.UUIDField(
default=uuid.uuid4,
editable=False
)Column(UUID(as_uuid=True),
primary_key=True,
default=uuid.uuid4
)Python's built-in uuid module makes UUID generation straightforward, but writing the import and generation code from scratch every time is tedious. Our Python UUID Generator produces ready-to-paste Python code snippets for UUID v1, v4, and namespace-based UUIDs — along with the actual UUID values, so you can test and use them immediately.
uuid.uuid4() generates a random UUID with no relationship to the machine or time — ideal for database IDs and tokens. uuid.uuid1() generates a time-based UUID that includes the machine's MAC address and current timestamp — it's unique but may reveal timing information.
No. The uuid module is part of Python's standard library and is available in all Python versions 2.5 and later. No pip install needed.
Namespace UUIDs are generated deterministically from a namespace and a name — the same inputs always produce the same UUID. uuid3 uses MD5 hashing and uuid5 uses SHA-1. They're useful when you need reproducible, unique identifiers for the same entity.
All processing happens locally in your browser. We never see, store, or transmit your data. This tool is fully client-side and secure.
Other free tools you might find useful