UUID 生成器UUID Generator
在线生成UUID/GUID,支持批量生成Generate UUID/GUID online, supports batch generation.
关于 UUID 生成器About UUID Generator
UUID(通用唯一识别码)是一个 128 位的标识符,广泛用于数据库主键、日志追踪、分布式系统 ID 等场景。本工具可一键生成标准格式的 UUID v4,并支持批量生成,方便造测试数据、初始化脚本等需求。A UUID (Universally Unique Identifier) is a 128-bit identifier widely used for database keys, log tracing and distributed-system IDs. This tool generates standard UUID v4 values in one click and supports batch generation for seeding test data or initialization scripts.
使用方法How to Use
- 设置需要生成的数量,默认可单次生成一个。Set how many UUIDs you need; a single one is generated by default.
- 点击生成按钮,获得格式标准的 UUID 列表。Click generate to get a list of well-formed UUIDs.
- 使用复制功能将结果(批量时每条一行)粘贴到目标位置。Use the copy action to paste the results (one per line in batch mode) wherever you need them.
常见问题FAQ
UUID v4 会重复吗?Can UUID v4 collide?
理论上可能,但概率极低:v4 有 122 位随机数,即使每秒生成十亿个、持续上百年,碰撞概率仍可忽略,足以胜任业务 ID。Theoretically yes, but the probability is negligible: v4 has 122 random bits, so even billions generated per second for a century would barely risk a collision — plenty safe for business IDs.
UUID 和 GUID 是一回事吗?Are UUID and GUID the same thing?
是同一个东西的不同叫法。GUID 常见于微软生态(SQL Server、.NET),UUID 是其余世界的称呼,二者格式完全兼容。They are two names for the same thing. GUID is common in the Microsoft ecosystem (SQL Server, .NET), UUID elsewhere; the formats are fully compatible.
UUID 适合做数据库主键吗?Is a UUID suitable as a database primary key?
可以,但要注意 v4 的随机性会导致 B 树索引频繁页分裂,影响高写入场景性能;此类场景可考虑有序 UUID(v7)或雪花算法 ID。Yes, but note that v4 randomness causes frequent B-tree page splits under heavy writes; for such workloads consider sequential UUIDs (v7) or snowflake IDs.
相关阅读Related Reading
相关工具Related Tools
JSON 格式化JSON Formatter
在线JSON格式化、校验、压缩、美化工具Online JSON formatter, validator, compressor and beautifier.
正则表达式测试Regex Tester
在线正则表达式测试工具,实时匹配高亮Online regex tester with real-time matching and highlighting.
随机密码生成器Password Generator
生成高强度随机密码,支持自定义长度和字符集Generate strong random passwords with customizable length and charset.
JSON 转换工具JSON Converter
JSON与XML/CSV/YAML格式互相转换Convert JSON to/from XML, CSV and YAML formats.