🎲

Token Generator

Generate cryptographically secure tokens, UUIDs, API keys, and more — entirely in your browser.

All tokens are generated using crypto.getRandomValues() — cryptographically secure, runs entirely in your browser, nothing sent to any server.
About this tool

Last updated:

Generate secure random tokens online

This token generator creates cryptographically secure random tokens in your browser. Pick a format, choose how many you need (1 to 50), and copy one token or the whole list.

How to use it

  1. Choose a Token Type from the list.
  2. For Hex String or Alphanumeric, set the Length with the slider (16 to 128 characters).
  3. Enter a Count from 1 to 50.
  4. Click Generate, then use Copy on a single token or Copy All for one token per line.

Token types

TypeOutput
UUID v4Standard 36-character UUID, such as xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
API Keyak_ followed by 64 hex characters (32 random bytes)
CSRF Tokencsrf_ followed by 64 hex characters (32 random bytes)
Hex String0–9 and a–f, length 16 to 128
AlphanumericA–Z, a–z and 0–9, length 16 to 128
Base64 URL-safe43 characters from 32 random bytes, using - and _, no padding

How it works

Every token comes from crypto.getRandomValues(), the browser's secure random number source. UUIDs use crypto.randomUUID() when the browser has it, and otherwise build a version 4 UUID from 16 random bytes. The tokens are made on your device and are not sent to any server.

Tips

  • Use at least 32 random bytes (64 hex characters) for secrets such as API keys and session tokens.
  • The ak_ and csrf_ prefixes are just labels. Remove them if your system expects a plain value.
  • Store real secrets in a secrets manager or environment variable, not in source code.

Frequently asked questions

Are these tokens secure enough for production?

They use the browser's cryptographic random source, which is suitable for secrets. Security also depends on how you store, send and rotate them.

Is this token generator free to use online?

Yes. It is free, needs no sign-up, and runs fully in your browser.

What is the difference between hex and Base64 URL-safe tokens?

Hex uses 16 characters, so each byte takes two characters. Base64 URL-safe uses 64 characters, so the same 32 bytes fit in 43 characters and are safe to put in URLs.

More to explore

Related Security

Browse all tools from the same category.

Showing 1-2 of 7