UUID v4 生成器
使用浏览器加密随机数生成最多 100 个随机 v4 UUID。
输入
提示:按 Ctrl + Enter 运行
已保存的设置
下方的详细帮助目前仅提供英文版。
关于此工具
A UUID (universally unique identifier) is a 128-bit ID written as 36 characters, such as 9af69896-65a4-45b8-a7e6-a276069700fd. Version 4 UUIDs are random, so they can be created anywhere without coordination with near-zero risk of collision. Developers use them as database primary keys, request IDs, file names and test fixtures.
This generator creates between 1 and 100 version-4 UUIDs in your browser using the Web Crypto random generator. Nothing is sent or stored.
使用方法
- Enter how many UUIDs you need, from 1 to 100.
- Run the generator.
- Copy the list, one UUID per line, or download it.
- Run it again whenever you need fresh IDs; every run produces new values.
计算原理
Each UUID comes from crypto.randomUUID(), which sets the version nibble to 4 and the variant bits to RFC 4122/9562, with 122 random bits.
crypto.randomUUID()计算示例
Seeding a test database with three customers, you generate 3 UUIDs such as 9af69896-65a4-45b8-a7e6-a276069700fd. The "4" at the start of the third group marks the version, and the first character of the fourth group is 8, 9, a or b, marking the variant.
示例输入和结果
xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
局限性
- Version 4 only.
- Up to 100 per run.
- Lowercase hexadecimal output.
最后更新:
常见问题
Can two UUIDs ever be the same?
In theory yes, in practice the chance is negligible: you would need to generate billions per second for many years to expect a duplicate.
Are they suitable as secret tokens?
They are unpredictable, but dedicated tokens with more randomness, such as from the password generator, are better for secrets.
What about time-ordered UUIDs (v7)?
This tool generates v4 only. Version 7 UUIDs embed a timestamp and sort by creation time.
故障排除
My database rejects them.
Some systems expect uppercase or no hyphens. Convert with the case converter or remove hyphens with find and replace.
Generation fails in an old browser.
crypto.randomUUID needs a modern browser served over HTTPS.
I need the same IDs again.
They are random each time; save the list you generated.
隐私 & 免费使用
我的输入会被保存吗?
你的数据只保留在此标签页中。我们不会收到你的文件、粘贴的文本或计算数值。
这个工具免费吗?
是的。无需注册或付费。