UUID 生成器
生成随机 UUID/GUID 识别码
使用方法
输入数值
在输入栏中填入您的数字或参数。
即时获取结果
结果在您输入时自动更新——无需按计算按钮。
复制或保存
将结果复制到剪贴板或用于您的工作流程。
为什么使用此工具
100% 免费
没有隐藏费用,没有付费等级——所有功能完全免费。
无需安装
完全在浏览器中运行。无需下载或安装任何软件。
隐私且安全
您的数据永远不会离开您的设备。不会上传至任何服务器。
支持移动设备
完全响应式设计——在手机、平板或桌面电脑上均可使用。
UUIDs: Universally Unique Identifiers Explained
Key Takeaways
- UUIDs (v4) use 122 bits of randomness to generate identifiers that are statistically guaranteed to be unique across all systems worldwide.
- UUID v4 is the most common version — purely random with no embedded timestamp or machine information.
- All UUIDs are generated in your browser using cryptographic randomness — nothing is stored or transmitted.
Universally Unique Identifiers (UUIDs) solve the fundamental distributed systems problem of generating unique identifiers without central coordination. Whether you are building microservices, designing database schemas, or creating distributed systems, UUIDs provide a standardized way to create identifiers that will never collide, even across independent systems.
The probability of generating two identical UUID v4 values is approximately 1 in 5.3 x 10^36.
Collision Probability
Key Concepts
UUID Versions
UUID v1 uses timestamp + MAC address. V3 uses MD5 namespace hashing. V4 uses pure randomness. V5 uses SHA-1 namespace hashing. V7 (new) combines timestamp with randomness for sortability.
UUID v4 Structure
A UUID v4 follows the format xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx where '4' indicates version 4 and 'y' is constrained to 8, 9, a, or b to indicate the variant. The remaining 122 bits are random.
UUID vs. Auto-Increment IDs
Auto-increment IDs are sequential and predictable, leaking information about record count and creation order. UUIDs are random and reveal nothing, making them better for public-facing identifiers.
UUID v7 — The New Standard
UUID v7 (RFC 9562) embeds a Unix timestamp in the first 48 bits, making UUIDs naturally sortable by creation time while maintaining randomness. This is ideal for database primary keys.
Pro Tips
Use UUID v7 for database primary keys — the embedded timestamp makes them naturally sortable, improving B-tree index performance.
Store UUIDs as binary (16 bytes) in databases rather than as strings (36 characters) for significant storage and performance gains.
Remove hyphens when UUIDs are used in URLs to keep them compact while maintaining readability.
Use crypto.randomUUID() in modern browsers — it is faster and more secure than JavaScript UUID libraries.
All UUIDs are generated entirely in your browser using the Web Crypto API. No generated identifiers are stored, logged, or transmitted to any server.