Token & Random String Generator
Generate cryptographically secure tokens, UUIDs v4, API keys, and custom random strings using your browser's built-in crypto API.
UUID v4
Standard universally unique identifier
Hex Token
Random hexadecimal string
Base64 Token
URL-safe Base64 random string
Alphanumeric
Letters and numbers only
Numeric PIN
Digits only โ OTP / PIN code
Custom Charset
Define your own character set
About Token & Random String Generator
Generates cryptographically secure random strings using crypto.getRandomValues() โ the same Web Crypto API used by browsers for security-sensitive operations. This is far more secure than Math.random() which is not cryptographically safe.
Token Type Guide
UUID v4 โ 128-bit identifier, standard format for database IDs ยท Hex โ ideal for API tokens, session IDs ยท Base64 URL-safe โ compact tokens for JWTs and cookies ยท Alphanumeric โ readable codes for vouchers, invite links ยท Numeric PIN โ OTP codes, PINs
Frequently Asked Questions
window.crypto.getRandomValues(), which provides cryptographically strong random values suitable for use in security tokens, session IDs, and API keys. This is the browser's CSPRNG (Cryptographically Secure Pseudo-Random Number Generator).