UUID & Password Generator

Generate cryptographically random UUID v4 identifiers or strong passwords using the Web Crypto API. Click any item to copy.

Understanding UUID v4

UUID (Universally Unique Identifier) v4 generates 128-bit identifiers using cryptographic randomness. With 122 random bits (6 bits are reserved for version and variant), there are 5.3 × 10³&sup6; possible values, making collisions practically impossible even across distributed systems generating millions of IDs per second.

UUID Use Cases

  • Database primary keys — UUIDs allow generating IDs on the client without a central authority. Popular with Postgres (uuid type), MongoDB, and distributed databases.
  • API resource identifiers — Unlike auto-increment IDs, UUIDs don’t expose row counts or creation order, improving API security.
  • Session and correlation IDs — Track requests across microservices with unique trace identifiers.
  • File naming — Prevent name collisions when multiple users upload files simultaneously.

UUID v4 vs Other ID Formats

UUID v4 vs UUID v7: UUID v7 (2024 standard) embeds a Unix timestamp in the first 48 bits, making IDs sortable by creation time — better for database indexing. UUID v4 vs ULID: ULID (Universally Unique Lexicographically Sortable Identifier) is also timestamp-prefixed and uses Crockford Base32, making it shorter (26 chars vs 36). UUID v4 vs nanoid: nanoid generates shorter, URL-safe IDs (default 21 chars) and is popular in frontend applications where compactness matters.

Password Generator

Our password generator uses crypto.getRandomValues() with a pool of 89 characters including uppercase, lowercase, digits, and symbols. A 20-character password provides approximately 130 bits of entropy. For comparison, NIST recommends at least 80 bits for high-security applications. Increase length to 32+ characters for master passwords or encryption keys.

UUID in Databases: Performance Considerations

While UUIDs are excellent for distributed ID generation, they can impact database performance if used carelessly. Random UUID v4 values cause B-tree index fragmentation because insertions are scattered across the index rather than appended sequentially. This leads to more page splits, higher write amplification, and larger index sizes. Mitigation strategies include: using UUID v7 (timestamp-prefixed, naturally sortable), storing UUIDs as BINARY(16) instead of CHAR(36) to halve storage, or using uuid_generate_v1mc() in PostgreSQL for time-ordered UUIDs. For MySQL/InnoDB, where the primary key determines physical row order, consider ORDERED_UUID() functions or using UUID v7 to maintain insert performance.

Password Entropy and Security

Password strength is measured in bits of entropy: log2(pool_size ^ length). Our generator uses 89 characters (uppercase, lowercase, digits, symbols), giving approximately 6.47 bits per character. A 12-character password provides ~78 bits of entropy, a 16-character password provides ~104 bits, and a 20-character password provides ~130 bits. For comparison: 8 random lowercase letters give only 37.6 bits (crackable in seconds), while 20 characters from our full pool would take billions of years to brute-force with current hardware. NIST SP 800-63B recommends at least 8 characters for user-chosen passwords, but for generated passwords, 16+ characters with the full character set is the industry best practice.

Security Note: All generation uses the Web Crypto API locally. No passwords or UUIDs are ever sent to any server or stored anywhere beyond your browser. The crypto.getRandomValues() method provides cryptographically strong random values sourced from the operating system’s entropy pool, making it suitable for security-sensitive applications.