Cryptographic Random Token Generator

Cryptographic Random Token Generator

Local Processing

Generate high-entropy random tokens in hex, base64, or base64url format using Web Crypto CSPRNG.

How It Works & Processing Standards

Generate high-entropy random tokens in hex, base64, or base64url format using Web Crypto CSPRNG.

Tool processing runs in your browser. If you create a calculator or conversion share link, its values are included in the URL. See the privacy policy for account, analytics and advertising data.

Current Limits

  • Maximum input length: 2,000,000 characters

For when you need an unpredictable string. Choose the byte count and it is made with the operating system’s cryptographic randomness, then encoded as hex, Base64URL or Base64.

Tokens are not stored. Copy it before you leave.

What You Can Do

Secure randomness
Uses crypto.getRandomValues, not Math.random.
Three formats
Hex (2 characters per byte), URL-safe Base64URL, or plain Base64.

How to Use Cryptographic Random Token Generator

  1. 1
    Set the byte countThe default 32 bytes (256 bits) is enough for most uses.
  2. 2
    Choose a formathex, base64url or base64.
  3. 3
    Generate and copyCopy the token.

Examples

Default (32 bytes, hex)
Input: Bytes 32, output hex
Result: A 64-character hex string (e.g. 284a2238ec61…, different every time)

Common Use Cases

  • Creating a new SECRET_KEY or JWT signing key for .env
  • Tokens for password-reset links or invite codes

Frequently Asked Questions (FAQ)

How many bytes are enough?

Use at least 16 bytes (128 bits) for secrets that must resist guessing; 32 bytes (256 bits) is common for signing keys.

Have feedback or ideas for this tool? Suggest & Inquire →