UUID Generator — v4, v7, nanoid, ULID (Bulk 1-100)
Generate UUID với 4 format: v4 random (chuẩn cũ), v7 time-ordered (mới, DB-friendly), nanoid (URL-safe ngắn), ULID (Crockford Base32). Bulk 1-100.
Vì sao dùng tool này
Khác v4 random, v7 sort theo timestamp → tốt cho DB primary key (index locality).
v4 dùng Web Crypto API của browser — cryptographically secure.
Slider chọn số lượng. Copy all 1 click, hoặc copy từng cái.
Cách sử dụng
- 1Chọn version: v4 / v7 / nanoid / ULID.
- 2Set count slider 1-100.
- 3Bấm Generate. Copy từng UUID hoặc Copy all.
Các loại UUID
UUID v4 (random): 122-bit random, dạng 8-4-4-4-12 hex. Phổ biến nhất nhưng KHÔNG sort theo time — gây index fragmentation trong DB.
UUID v7 (RFC draft 2024): 48-bit Unix ms timestamp + 74-bit random. Sort lexicographically theo time → primary key DB tốt hơn.
nanoid: 21 chars URL-safe (A-Za-z0-9_-). Shorter than UUID, vẫn 126-bit entropy. Phổ biến trong Node ecosystem.
ULID: 26 chars Crockford Base32. Time-ordered, case-insensitive, no special chars.
- ✓UUID v4 native crypto.randomUUID
- ✓UUID v7 inline implementation
- ✓nanoid custom length 6-64
- ✓ULID 26-char time-ordered
- ✓Bulk generate 1-100
- ✓Format options: uppercase, no-dashes
- ✓Copy all + per-item
Câu hỏi thường gặp
v4 vs v7 dùng cái nào?
v4 cho ID rời rạc không cần sort (user_id, request_id). v7 cho DB primary key cần index locality (better INSERT perf, range scan).
nanoid có chuẩn không?
Không phải RFC standard, nhưng được dùng rộng rãi (Node, Stripe, GitLab). 21-char default = 126-bit entropy, gần v4 (122-bit).
ULID khác UUID v7 thế nào?
Cùng concept time-ordered. ULID dùng Base32 (26 chars) thay vì hex 8-4-4-4-12 (36 chars). Khác mostly cosmetic.