UUID's Genereren Stap voor Stap
Quick Answer
Om een UUID te genereren: open de UUID Generator, selecteer versie 4 (random) en klik op Generate. De tool produceert een UUID zoals "550e8400-e29b-41d4-a716-446655440000" met crypto.getRandomValues. Alle generatie gebeurt lokaal.
Introduction
Een UUID (Universally Unique Identifier) is een 128-bit identifier die praktisch gegarandeerd uniek is zonder coördinatie tussen partijen. UUID's worden veel gebruikt als database primary keys, request-ID's, session-tokens en identifiers in gedistribueerde systemen. De meest voorkomende versie is UUID v4, die willekeurige bits gebruikt.
Step by Step
-
Open the UUID Generator tool
Go to the UUID Generator tool page. The tool supports UUID v4 (random) and v1 (time-based) generation.
-
Select the UUID version
Choose UUID v4 for most use cases — it uses cryptographically secure random bits and has no privacy concerns. Choose v1 only if you need time-ordered IDs and accept the privacy tradeoff (v1 embeds a timestamp and MAC address).
-
Choose the quantity
Set how many UUIDs you want to generate — from 1 to 1000. Generating multiple UUIDs at once is useful for seeding a database or creating batch request IDs.
-
Generate the UUIDs
Click Generate. The tool produces UUID(s) using crypto.getRandomValues for v4, ensuring cryptographic randomness. Each UUID is a 36-character string in the format 8-4-4-4-12 hex digits.
-
Copy the UUID(s)
Click Copy to copy a single UUID, or copy the entire list if you generated multiple. Use the UUID as a database ID, request correlation ID, or session token.
Examples
UUID v4 (random)
Input: Version: 4, Quantity: 1
Output: 550e8400-e29b-41d4-a716-446655440000
Multiple UUID v4
Input: Version: 4, Quantity: 3
Output: f47ac10b-58cc-4372-a567-0e02b2c3d479
7b582ea2-1f4d-4f6a-9c83-3a5f2b8e1d47
3d4a5b6c-7e8f-4a2b-9c1d-0e3f5a7b9c2d
UUID v1 (time-based)
Input: Version: 1, Quantity: 1
Output: a3bbf0ee-d6e4-11ed-a5b3-3c9703e8b4a1
Common Problems
- Using Math.random() to generate UUIDs —it is not cryptographically secure. Always use crypto.getRandomValues() or crypto.randomUUID().
- Storing UUIDs as strings in databases —UUIDs stored as UUID type (16 bytes) are more efficient than strings (36 bytes).
- Using v1 in security-sensitive contexts —v1 embeds a timestamp and MAC address, which can leak information. Use v4 for anonymity.
- Assuming UUIDs are truly unique —they are practically unique (collision probability is negligible), but not guaranteed unique.
Tips
- Use UUID v4 for almost all use cases —it is random, has no privacy concerns, and is supported by all modern databases.
- Use crypto.randomUUID() in modern browsers for a built-in v4 generator without a library.
- Store UUIDs as UUID/GUID type in databases (16 bytes) instead of strings (36 bytes) for better storage and index performance.
- Use UUIDs as request IDs for distributed tracing —they correlate requests across services without central coordination.