UUID Generator

Tạo UUID v4 bằng crypto.randomUUID.
e3acd6c8-46b9-4b2c-ab37-d386334641ca

UUID v4

Cryptographically random via crypto.randomUUID().

Bulk Generate

Generate up to 100 UUIDs at once.

Copy Result

One-click copy to clipboard.

Client-side

All processing in your browser. No data uploaded.

Giới thiệu về UUID Generator

A UUID (Universally Unique Identifier) is a 128-bit label used to uniquely identify objects in computer systems. Version 4 UUIDs are generated using cryptographically random numbers, making them statistically unique without any central coordination. They are formatted as 32 hexadecimal digits displayed in five groups separated by hyphens: xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx. UUIDs are widely used in distributed systems, databases, and APIs as primary keys, session tokens, and request correlation IDs — anywhere you need a globally unique value that can be generated independently on any machine without risk of collision. This tool generates one or up to 100 UUIDs at once using the browser's built-in crypto.randomUUID() API, which guarantees cryptographic-quality randomness. You can toggle uppercase output and copy individual UUIDs or the entire batch with a single click. All generation happens entirely in your browser — nothing is sent to any server, so your identifiers remain private.

Làm sao để UUID Generator?

  1. Choose how many UUIDs to generate (1–100) using the Count input.
  2. Optionally check the Uppercase toggle if you need capital letters in the output.
  3. Click Generate to create a fresh batch of cryptographically random UUID v4s.
  4. Click Copy next to any individual UUID to copy just that one to your clipboard.
  5. Click Copy All to copy the entire batch as newline-separated values.
  6. Paste the UUIDs into your database, code, or configuration as needed.

Câu hỏi thường gặp

Is UUID v4 truly unique?

UUID v4 uses 122 bits of randomness. The probability of generating a duplicate is so small (about 1 in 5.3×10³⁶) that for all practical purposes they are guaranteed unique, even if you generate billions of them.

What is the difference between UUID v1 and v4?

UUID v1 is based on the current timestamp and your machine's MAC address, which can leak information and may have collisions if generated quickly. UUID v4 is purely random, making it safer for most applications.

Can I use UUIDs as database primary keys?

Yes. UUIDs make excellent primary keys in distributed systems because they can be generated client-side without a round-trip to the database. The trade-off is that they are larger than integer keys and slightly slower to index.

Does this tool store the UUIDs it generates?

No. All generation happens locally in your browser using the Web Crypto API. No UUIDs or any other data are sent to our servers.

What format does UUID v4 use?

UUID v4 follows the RFC 4122 format: 8-4-4-4-12 hexadecimal characters separated by hyphens, totalling 36 characters including hyphens (32 hex digits).

Tạo Mã UUID / GUID v4 Ngẫu Nhiên Chuẩn Quốc Tế: Đơn Lẻ & Hàng Loạt

Sinh mã định danh độc nhất toàn cầu (Universally Unique Identifier) bằng thuật toán mật mã CSPRNG

Vấn đề thường gặp & Giải pháp

Cần sinh các khóa chính (Primary Keys), mã đơn hàng hoặc transaction ID duy nhất mà không lo bị trùng lặp trong các hệ thống phân tán.

Metoolzy UUID Generator cho phép tạo chuỗi UUID v4 chuẩn RFC 4122 với thuật toán số ngẫu nhiên mật mã học (CSPRNG), hỗ trợ tạo hàng loạt lên tới 500 UUID cùng lúc.

Tính Năng Nổi Bật Của UUID Generator

  • Chuẩn RFC 4122 v4: Xác suất trùng lặp gần như bằng 0 (1 trên hàng tỷ tỷ).
  • Tạo hàng loạt (Bulk Generator): Sinh từ 1 đến 500 UUID chỉ với 1 cú click chuột.
  • Tùy biến định dạng: Tùy chọn có/không có dấu gạch ngang (-), chữ hoa/thường, hoặc đóng ngoặc nhọn {}.
  • Sao chép tiện lợi: 1-click sao chép toàn bộ danh sách vào clipboard.

Hướng Dẫn Sử Dụng Từng Bước

  1. Chọn số lượng UUID bạn muốn tạo (1 - 500).
  2. Tùy chỉnh định dạng (Chữ hoa/thường, Dấu gạch nối).
  3. Nhấn Tạo UUID và bấm Sao chép.

Bảng So Sánh Chi Tiết

Phiên bản UUID Cơ chế sinh Ứng dụng chính
UUID v1 Dựa trên thời gian (MAC address + Timestamp) Dễ bị lộ thông tin phần cứng
UUID v4 Hoàn toàn ngẫu nhiên (CSPRNG Cryptographic) Tiêu chuẩn phổ biến nhất cho Database & API
UUID v5 Dựa trên Namespace và tên (SHA-1 hash) Khi cần sinh UUID cố định theo định danh

Trường Hợp Ứng Dụng Thực Tế

  • Khóa chính Database (PostgreSQL, MongoDB, MySQL)
  • Transaction ID cho hệ thống thanh toán và đơn hàng
  • Mock data cho kiểm thử phần mềm

Câu Hỏi Thường Gặp (FAQ)

UUID v4 có nguy cơ bị trùng lặp không?

Về mặt toán học, xác suất trùng lặp 2 UUID v4 là khoảng 1 trên 2.71 x 10^18, nhỏ hơn nhiều so với xác suất bị sét đánh trúng!