UUID, NanoID & Hash Generator
Generate unique identifiers, cryptographic hashes, and URL-friendly slugs instantly. Perfect for developers working with databases, APIs, and file integrity verification.
Randomly generated UUID (most common)
No UUIDs generated yet
Click generate to create UUIDs
What is a UUID?
A UUID (Universally Unique Identifier) is a 128-bit number used to uniquely identify information in computer systems. Also known as GUID (Globally Unique Identifier), UUIDs are standardized by the Open Software Foundation (OSF) as part of the Distributed Computing Environment (DCE).
UUIDs are commonly used in databases as primary keys, in distributed systems to ensure uniqueness across multiple nodes, and in APIs to identify resources without collision risks.
UUID vs NanoID
While UUIDs are 36 characters long (with hyphens), NanoIDs are more compact, URL-friendly alternatives:
- Size: NanoID is 21 characters by default vs UUID's 36 characters
- URL-Safe: NanoID uses URL-safe characters (A-Za-z0-9_-) by default
- Customizable: NanoID allows custom alphabet and length
- Performance: NanoID is 60% faster than UUID v4
- Security: Both are cryptographically secure with proper randomness
Hash Functions Explained
Hash functions are one-way cryptographic algorithms that convert input data into fixed-size strings. They're essential for:
- File Integrity: Verify files haven't been corrupted or tampered with
- Data Deduplication: Identify duplicate content using hash fingerprints
- Digital Signatures: Create and verify cryptographic signatures
- Checksums: Validate data transmission accuracy
⚠️ Important: Do not use MD5 or SHA-1 for security-critical applications as they have known vulnerabilities. Use SHA-256 or SHA-512 for secure hashing. Never use hashing alone for password storage - use proper password hashing algorithms like bcrypt or Argon2.
When to Use Each ID Type
Use UUID When:
- Working with legacy systems expecting UUIDs
- Need timestamp-based sorting (UUID v1, v7)
- Require namespace-based generation (UUID v5)
- Standard compliance is important
Use NanoID When:
- Building new systems with no UUID requirement
- Need URL-friendly identifiers
- Want shorter IDs (better for URLs, QR codes)
- Performance is critical
Frequently Asked Questions
Which UUID version should I use?
For most applications, use UUID v4 (random) for general-purpose unique IDs, orUUID v7 if you need sortable IDs with timestamp ordering (great for database primary keys). Use v1 only if you need timestamp + MAC address, and v5 if you need reproducible UUIDs from namespace + name combinations.
Is MD5 secure?
No, MD5 is not secure for cryptographic purposes due to collision vulnerabilities discovered in 2004. Use it only for non-security purposes like checksums or cache keys. For security, use SHA-256 or SHA-512. For password hashing, use dedicated algorithms like bcrypt, scrypt, or Argon2.
What's the difference between hash and encryption?
Hashing is a one-way function - you cannot reverse it to get the original input. It always produces the same output for the same input. Encryption is two-way - you can decrypt to recover the original data. Use hashing for integrity verification and encryption for confidentiality.
Can UUIDs collide?
While theoretically possible, UUID collisions are astronomically unlikely. A properly generated UUID v4 has only a 50% probability of collision after generating 2.71 quintillion (2.71 × 10¹⁸) UUIDs. For practical purposes, you can assume they're unique.
What is HMAC mode in hashing?
HMAC (Hash-based Message Authentication Code) uses a secret key along with the hash function to create a keyed hash. This ensures both data integrity and authenticity - only someone with the secret key can generate or verify the hash. It's commonly used in API authentication and JWT tokens.